gms_session_id

Usage: gms_session_id ( n )

Description

Returns the nth session_id.

Replies (6)

Last message on 16 Sep 2016

Arcadian on 15 Sep 2016, 19:54:55
Sorry if you have answered this in the past yet but, the "n" value start at 0, or 1? For example in gms_session_id(n) the first session is known as 0 or 1?
Size43 (Administrator) on 16 Sep 2016, 09:29:52
The n value starts at zero, just like an array. I should've named it "index" instead of "n".
Arcadian on 16 Sep 2016, 13:16:21
Thank you very much for your fast answer.

In addition, if you use gms_sesiĆ³n_id(0) we can say you retrieve the "main sesion" id in any case?? Or it can be a secondary session created later?
Size43 (Administrator) on 16 Sep 2016, 13:23:59
Sessions aren't sorted in any particular order. If you want to get the "main" session, you should check its type. The session with type '0' is the default session.
rater193 on 30 Apr 2016, 23:05:40
is it possible to retrieve session data, for example, getting the name of a session?
Size43 (Administrator) on 11 May 2016, 10:19:30
The sessions don't have any data associated with them, other than the session type. You could use a GameINI to store additional session information if you need to.