F
FuRyvok
Guest
Hello, i have a button, when i click on it it sends out a HTTP request
It should generate a json with random values what looks like:
This code works fine, but sometimes the game crashing and it says the JSON is undefined.
Code:
//This is on the left pressed event
http_get("http://mywebsite.com/generate.php");
Code:
{"s1o1":"6","s2o1":"5"}
Code:
//This is in the Button's Async - HTTP Event
if(async_load[? "status"]<0){
show_message("Cannot connect to server.");
}else{
var json = async_load[? "result"];
var map = json_decode(json);
}