Reference des fonctions
GameMaker Studio · GML · Players
gmda_getPlayerid
Returns the current player's unique key.
Synchronous (returns directly)
Signature
gmda_getPlayerid() -> stringWhat it does
Reads the player key cached locally from the session. No network call.
Parameters
This function takes no parameters.
How to call it
Read it any time after the session_started event. Never show it in a production build.
Returns: The unique player key. Empty until the session starts.
Example
show_debug_message("debug player id: " + gmda_getPlayerid());Use cases
- Reference the player in support tickets or debug logs.