If Programable_Matter
Member
I've been uploading json files unto a webserver and had no problem with them on game maker... for some reason I now keep getting this error with a new project I have started :
json_decode argument 1 incorrect type (undefined) expecting a Number (YYGR)
Create Event
http_get("website.json")
question = ""
HTTP Event
// Get the answer
json = async_load[? "result"];
//Convert Json to ds_map
map = json_decode(json);
if (map == -1)
{
show_message("Invalid")
exit;
}
if (ds_map_exists(map, "question"))
{
question = map[? "quesiont"];
}
When executing the program I get
json_decode argument 1 incorrect type (undefined) expecting a Number (YYGR)
I've never had this problem before working with JSON files
json_decode argument 1 incorrect type (undefined) expecting a Number (YYGR)
Create Event
http_get("website.json")
question = ""
HTTP Event
// Get the answer
json = async_load[? "result"];
//Convert Json to ds_map
map = json_decode(json);
if (map == -1)
{
show_message("Invalid")
exit;
}
if (ds_map_exists(map, "question"))
{
question = map[? "quesiont"];
}
When executing the program I get
json_decode argument 1 incorrect type (undefined) expecting a Number (YYGR)
I've never had this problem before working with JSON files