Hey everyone !
I'm in the middle of creating something new , but I got a small problem
Here's what I want to do , I've put two JSON codes in each of the text files , and I'm looking to load them in the roomlist with a loop
Everythings working fine till now , call the project files , but then , In the loop , When I enter the two codes in the array , seems like they come back as 0 as if they weren't strings , I've added a text file for debug purpose and the capx below
AJAX to Array
Thanks for reading !
Went out of page ...
Seems like Yann is online
Bump again . it went out of the spotlight again !
What does go wrong exactly ? You want to store the JSON data in the array but it's not storing it as a string ?
Develop games in your browser. Powerful, performant & highly capable.
yeah , it always returns a 0 in the array , even if it works with tokenat(LastData)
Okay , just to reproduce the issue ,
Action with "On Up Completed" Condition ; Set text to tokenat(AJAX.LastData,0,"|")
Returns the JSON code
RoomList ... Wait a sec ...
Found it !
It's just that roomdata is not supposed to host those codes ,
Just replaced roomdata with roomlist and done
Thanks for caring ;)
Ah ! Of course, if you test the wrong array, it won't return anything ! :P