gms_vs_time
Description
Returns the time that's needed before the game starts. 0 means an infinitely long time (not enough players to start), or that the game is starting.
Replies (14)
Last message on 28 Dec 2014
I use this code for starting the game:
if(gms_vs_ready())
{
gms_team_auto_join();
room_goto_next();
}
It works fine on PC, but doesn't seem to work on Android, there it shows gms_vs_time() as 0, while on PC it jump from 0 to -1 until the other player connects.
Size43
(Administrator)
on
22 Dec 2014, 14:41:12
Are you using the "All" version of the extension on both Windows and Android?
I was using the Windows version. When I switch to All it will do this on all platforms.
Size43
(Administrator)
on
22 Dec 2014, 21:47:30
The Windows version does not work on anything but Windows. The All version will work on all platforms, but you'll be unable to use the update functions as those require access to the filesystem and need a DLL. ;)
To make it work on Windows I had to gms_network() to the networking event, as said in the getting started. With this both Windows and iOS connect and get matched against each other, but the iOS crashes with Illegal Buffer Index at gml_Script_XServer_readinstance. I found this error at
http://gamemakerserver.com/en/news/14/, but I am using 1.3.1354 and on Windows it works fine.
Size43
(Administrator)
on
23 Dec 2014, 17:15:53
Was going to post something about how I'm not able to test the extension on iOS devices, but it seems like this is actually a bug. It'll be fixed in time to go into the 1.8 update which I'm hoping to release very soon (preferrably before christmas if at all possible :P).
Not sure why the windows version is not crashing, it should too. Whatever the case, thank you for bringing this to my attention!
It seems to crash on Windows as well, the iOS version is slower, so it got the data that causes the crash earlier. gms_instance_sync(ins, is_onetime); causes the crash,
while gms_instance_sync(ins_stats[1], is_full ); doesn't, but is not working.
gms_self_set("myname",playername); seems to work fine.
Size43
(Administrator)
on
23 Dec 2014, 21:06:17
Depending on the position of the instance, syncing may or may not work properly due to the bug. There's not really anything you can do to fix it. :)
I updated to 1.8 and the Windows version works fine now, but the iOS doesn't, because it throw this error while compiling: GMExtensionConstant - Unable to parse node - hidden - text - 0
Size43
(Administrator)
on
27 Dec 2014, 14:52:11
I'm seeing those messages too. They do not appear to mean anything useful. :) Is there maybe another error in the compile log that shows the actual reason the compile failed?
The problem seems to be with the 1.4 version, it works fine in 1.3.1354.
The HTML5 throws this error while compiling, even with the HTML5 extension: Error : gml_Script_wle_step(0) : argument naming error, 3 arguments but no reference found to argument1
Size43
(Administrator)
on
28 Dec 2014, 11:15:37
If you need this fixed before I am able to put out an update, right-click the extension, select "Open Extension Directory". Open the GameMaker Server .gml file, and search for a line that starts with "#define wle_step" (without quotes). Right below that line, add a line that says "string(argument1);" (without quotes). Save & close the file. That should fix it :)
GameMaker Server does not work on the JavaScript exports by the way.
Size43
(Administrator)
on
28 Dec 2014, 11:06:46
Ah, I see. This isn't a problem when compiling for windows, but HTML5 and possibly iOS don't like arguments that aren't used. I'll try to fix it ;)
The iOS and Windows work fine on 1.3.1354 when using the new all extension, HTML5 compiles after the fix you posted, but doesn't connect as you said.