jobjorgos
Member
I need instance variable online_players to be send over from GameMaker to players.js on my website
Too bad with the code below there has not anything been updated yet in the players.js file.
Alarm[0] Event:
players.js
And afterall, are these 'permission settings' of players.js alright?
Too bad with the code below there has not anything been updated yet in the players.js file.
Alarm[0] Event:
GML:
http_post_string("http://example.com/***/***/players.js", "online_players="+string(online_player));
//I'm confident that the path is correct, but I guess I should not show the full path to public here because then anybody can adjust players.js on my website?
players.js
JavaScript:
online_players = 0;
//updates every 1 second
var myVar = setInterval(myTimer, 1000);
function myTimer() {
//realmstatus
document.getElementById("realmstatus").innerHTML = online_players + " Players are now online in the world"
}
And afterall, are these 'permission settings' of players.js alright?
Last edited: