Usage: gms_connect ( )


Connects to the server. You only need to call this script, when gms_info_isconnected returns false. This script will be executed automatically when the game starts.

Replies (9)

Last message on 17 Jul 2021

fatrocstudios on 10 Mar 2015, 06:42:10
I've had no problems connecting to the server and reading and writing INI files so far. A few hours ago, the game I had working suddenly stopped connecting to the server. Is there something that I don't understand or is there a problem with the server?
Size43 (Administrator) on 10 Mar 2015, 12:26:55
Sorry about that. I've downloaded the full log files that should contain information about why this happend, and I'm going to try and fix this.
tifongames on 10 Mar 2015, 13:02:22
DinoWattz on 7 Jul 2021, 04:49:40
Hey size, is there a way to disconnect from the server?
it's because I don't want the player to stay connected while playing in singleplayer mode
Size43 (Administrator) on 16 Jul 2021, 22:20:33
You can use gms_logout to log the player out of their account. There's no way to disconnect from the server, strangely enough. I'll add that to my todo list.
DinoWattz on 17 Jul 2021, 04:06:09
Ok, thanks size!
Dublann on 5 Apr 2017, 22:57:29

When running in android and the app is running in the background, the game is disconnected to the server. In order to solve it, when openning again from background, I have in the controller object:
Step event
if room==room_main_centro or room==room_main_izq or room==room_main_dcha or room==room_main_chat or room==room_guarida
    if gms_info_isconnected()==false && alarm[3]=-1
    if gms_info_isconnected()==true && gms_info_isloggedin()==0

Alarm 3 event

This code is not connecting me again to the server. What is wrong?

Size43 (Administrator) on 16 Apr 2017, 16:26:50
Does scr_login receive any error messages?
tifongames on 10 Mar 2015, 12:16:56
Hi Size43,
I have the same problem