The "send_var" instruction is a load of [censored], it doesn't work at all. I tired to send it when the client doesn't exist and when the client does exist but it doesn't do anything. The client reads the variable as 0 when the server says it's 2.

I use A6.50, why doesn't it bloody work? I hate 3DGS multiplayer, it's soooo long to debug. I change one little variable to see if it works and I have to restart the server and then the client and wait till it loads.

Code:

var players_connected = 0;
////////////////////////////////////////////////////////////
// Server Event
////////////////////////////////////////////////////////////
function server_event(str)
{
if(event_type == event_join)
{
players_connected += 1;
send_var(players_connected);

return;
}
if(event_type == event_leave)
{
players_connected -= 1;
send_var(players_connected);

return;
}
}