|
mplay_session_name(numb) |
|
numb = this is the number of the session. the function mplay_session_find(), returns the number of session available to join, the first session is 0, and so on, depending on how many sessions.
This function just returns the string name of the session numb. This can be useful for making a list of choices where the player can pick what session to join. For example, a Chat Room needs this mechanism to let the player choose what chatroom join and chat.
Example
But if you want for example quickly store in an array the names of the sessions you can for example do something like this:
Example
The above example first calls the mplay_session_find(), then uses a loop to massively search through the sessions and stores their names in an array. However, this example just stores the names of the first 11 sessions, if you just want to store depending on how many session were found replace the i=0 to i=mplay_session_find(), and delete the first line.
gml_josea – Revision #1 |