For a week now, I'm looking for a system that add data / XML dynamically in my manialink.
An example:
- When a player do an action on my manialink. An HTTP request is sended to a website.
- Then the website gives a response (JSON or XML returned).
- My manialink display the response
In red is the thing I want your help...
I don't know how to display the results returned.
I tried two things :
1 - Create a layer
... but this doesn't work.
The following code was found on numerous code I saw ingame (livemenu.maniaplanet.com or something like this...) and in the official documentation
Code: Select all
declare CUILayer MyLayer;
MyLayer = UILayerCreate();
MyLayer.Type = CUILayer::EUILayerType::Normal // Is it correct ?
Tried to set content in ManialinkPage attribute and the same error is displayed.
2 - Use a JSON parser library
I want to include a JSON library but the declaration part and the functions of this library are all placed at the top of the script so ManiaScript doesn't like that. I need to copy all the functions and the variable declarations directly in my own code but ManiaScript doesn't like that too : Variable are declared but ManiaScript says no.
So I want your help.
Have you a third solution ?
Can we create layers in manialinks ?
Is the first code incorrect ?