___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object obj_server:
ds_map_find_value argument 1 incorrect type (5) expecting a Number (YYGI32)
at gml_Script_XServer_step (line 946) - _l = ds_map_find_value(_s, "variable_changed");
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_XServer_step (line 946)
called from - gml_Script_gms_step (line 59) - __ret = XServer_step(__current_room);
called from - gml_Object_obj_server_StepNormalEvent_1 (line 2) - gms_step();
Replies (8)
Last message on 27 Nov 2018
kerimgt
(Topicstarter)
on
23 Nov 2018, 21:46:01
if (message_id = 12) {
posX = real(ds_list_find_value(arguments,0));
posY = real(ds_list_find_value(arguments,1));
obj = ds_list_find_value(arguments,2);
instance_create(posX,posY,obj);
gms_p2p_send(12,gms_p2p_all_in_session,string(mouse_x),string(mouse_y),block_index(block));
Why shouldn't we use p2p messages if theyre guaranteed to send,
i tried sync before and it keeps bugging like creates many objects etc even i put it on only create even.
kerimgt
(Topicstarter)
on
23 Nov 2018, 17:05:28
I guess no, i use p2p messages to sync instances so
Size43
(Administrator)
on
27 Nov 2018, 16:01:26
In that case I suspect that you might be accidentially writing to one of the ds_lists or ds_maps that GameMaker Server uses for tracking synced instances.
The code that's giving you this error will literally only execute if you're syncing at least one instance, so I don't see any other way that this could be happening.
jdev
on
23 Nov 2018, 19:16:09
You shouldn't rely on p2p messages for syncing a lot of objects. You should use the following functions:
gms_instance_sync(id, flags, "var1", "var2"...)
gms_instance_sync_destroy(id)
gms_instance_sync_destroy_silent(instance)
gms_instance_sync_var_add("variable", value [, precision])
jdev
on
23 Nov 2018, 19:26:44
Player to player (p2p) messages are generally used to sent variables, strings, and other type of information to another player.
For example, you could send the variable "lives" which has a value of "5" to all players in the session so they know how many lives you have left like this:
[code]
Create Event (For Example):
gms_p2p_send (UpdatePlayerStats_lives,gms_p2p_all_in_session,lives);
p2p receive Script:
case UpdatePlayerStats_lives:
receivedData_lives = ds_list_find_value(data, 0);
draw_text(x,y,"Other player lives: "+string(receivedData_lives));
You'd have to set "UpdatePlayerStats_lives" as a macro in order for this to work.
Size43
(Administrator)
on
18 Nov 2018, 15:19:35
Are you using instance sync at all?
kerimgt
(Topicstarter)
on
20 Nov 2018, 22:18:16
it happens randomly sometimes when i login sometimes on session theres no clear reason that i saw ever.
Size43
(Administrator)
on
22 Nov 2018, 20:49:23
That doesn't really answer my question though.
Are you using instance sync anywhere in your game? If so, are you using onetime, extended, or full sync?