N
NoFontNL
Guest
I get the error:
And this is in the HTTP event (WebAsyncEvent)
But sometimes, not all the time, but at some random moments, I get this error. Short version above:
I request with http_get using this code:json_decode argument 1 incorrect type (undefined) expecting a Number (YYGR)
Code:
if (!requested) { // inside draw event
http_get('http://gmscoreboard.com/handle_score.php?tagid=mytagid&getscore=1')
requested=true;
}
Code:
if (!ready) { // inside HTTP event
wrjson = async_load[? "result"];
wrjsonlist = json_decode(wrjson);
worldrecord = wrjsonlist[? "s1"];
wrowner = wrjsonlist[? "p1"];
ready=true
}
I never requested the http_get with another thing. Only the GM Scoreboard URL which is working sometimes, but sometimes my game crashes. What is the problem here??___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Async Event: HTTP
for object obj_menu:
json_decode argument 1 incorrect type (undefined) expecting a Number (YYGR)
at `� (line 4) - wrjsonlist = json_decode(wrjson);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_menu_WebAsyncEvent_1 (line 4)