So I Wanted To Implement A System That Shows Up The Existing Rooms To The Players, But Still My Question is How Can I Draw Sessions Like This ?http://prntscr.com/h9focs
Hey,
I've been trying to remake this system but there is a problem, so basically even though no one created any session at all there is always these 2 sessionshttp://prntscr.com/nbux7i and they also say that there is 1 player on them while there's no one in there.
This is what I've got so far :
var i; for(i = 0; i < 25; i += 1;){ if (gms_session_exists(i)){ draw_text(x+55,y+(20*i),"Room : "+string(i)+" Players : "+string(gms_session_count())+"/4"); } }
that code is inside of the LobbyController object and inside of a draw event.
gms_session_count returns the number of sessions, not the number of players in that session. There's gms_session_player_count(...) for getting the number of players in the session.
Also, you should only use session IDs (except for gms_session_find(i)) as arguments to any gms_session_* functions. Using an index directly has been deprecated.