An error in sync, and 2 questions

Posted by mpgame
Hey Size and others,

I have following error sometimes when an object synced:

"DoSet :: Invalid comparison type error in gml"

But I'm sure that error isn't related to comparison type because all of comparisons are correct. I think problem is related to an event that happens at the same time for both of players in a battle. what is your idea or solution?

PS: I thought more, maybe I must use gms_instance_get_real ( id, "variable" ) and gms_instance_get_string ( id, "variable" ) instead of gms_instance_get ( id, "variable" )... probably a boolean variable and gms_instance_get ( id, "variable" ) cause the problem.



Also two small and important questions:

1- How many score can set in a highscore? Has it limit? If it has limit, when a highscore is full what will happen?
2- Can a game create 65535 sessions from an unique type or 65535/255=257 sessions can create from an unique type?

Replies (3)

Last message on 6 Mar 2017

Size43 (Administrator) on 16 Feb 2017, 16:11:42
gms_instance_get will return 0 if the variable has not been received. If you're comparing against a string, that may give the error. In that case you could use the ..._get_string function, which will always return a string.

You can create multiple sessions that have the same type. There's a global limit of 65535 sessions, but you'll have crashed the server long before you manage to create do many sessions anyways.
mpgame (Topicstarter) on 18 Feb 2017, 12:23:09
Thanks... and what about:
How many score can set in a highscore? Has it limit? If it has limit, when a highscore is full what will happen?
Size43 (Administrator) on 6 Mar 2017, 15:07:06
The top 500 scores will be loaded and shown to the user. More scores can be added and will be saved, but only the 500 best ones will be shown.