Referencia de funciones
GameMaker Studio · GML · Setup & session
gmda_hasConnectivity
True if the last HTTP attempt reached the server.
Synchronous (returns directly)
Signature
gmda_hasConnectivity() -> realWhat it does
Returns the connectivity flag, which is set from the status of the last HTTP reply handled in gmda_HTTPfunction(). It is false until the first request completes, or after a network failure.
Parameters
This function takes no parameters.
How to call it
Read it any time to show or hide an offline banner.
Returns: 1 if the most recent request reached the server, otherwise 0.
Example
if (gmda_hasConnectivity() == 0) {
draw_text(8, 8, "offline");
}Use cases
- Show or hide an offline banner.
- Disable buttons that need the network when there is no connection.