Enemy Sync Problems(from documentation)

Posted by JamSnack
___________________________________________
############################################################################################
ERROR in
action number 1
of Step Event0
for object GMS:

Retrieving owner for non-existing instance 100018.000000
at gml_Script_XServer_error (line 3) - show_error(argument0, false);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_XServer_error (line 3)
called from - gml_Script_gms_step (line 177) - XServer_error(gms_action_get_argument_string(0));
called from - gml_Object_GMS_StepNormalEvent_1 (line 1) - gms_step();


This error shows up every time the alarm[0] inside my obj_npc is set off. Please note that "Retrieving owner for non-existing instance" is the only thing that matters in this error as I have no control over anything else.

Replies (10)

Last message on 3 Jan 2018

Size43 (Administrator) on 21 Dec 2017, 17:42:36
Please try updating to the latest version of the extension to see if that fixes the issue:
https://gamemakerserver.com/en/news/56/
JamSnack (Topicstarter) on 29 Dec 2017, 05:15:35
I have updated to the most recent version of GM: Server (2.0.1 I believe) and have now found this error:

############################################################################################
ERROR in
action number 1
of Step Event0
for object GMS:

Retrieving owner for non-existing instance 100019.000000
at gml_Script_XServer_error (line 3) - show_error(argument0, false);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_XServer_error (line 3)
called from - gml_Script_gms_step (line 171) - XServer_error(gms_action_get_argument_string(0));
called from - gml_Object_GMS_StepNormalEvent_1 (line 1) - gms_step();

If you cannot directly discern what the problem is may you try using the documentation as a guide to recreate it.
Thank you for your time.
Size43 (Administrator) on 29 Dec 2017, 12:55:22
Are you using gms_instance_is_owner anywhere?
JamSnack (Topicstarter) on 29 Dec 2017, 19:32:23
I believe I am not, I followed the documentation however I skipped the bullet part as I do not want to incorporate bullets into my project. If this is the case I will go back and input the bullets as maybe a melee attack or something along those lines. I will get back to you if it doesn't work.
JamSnack (Topicstarter) on 29 Dec 2017, 19:33:25
Actually I was using gms_instance_is_owner in the alarm event which was triggering this error.
JamSnack (Topicstarter) on 30 Dec 2017, 20:01:05
In obj_npc, I added a draw event so I could draw out what the instance owner id was and found that it was returning -1 every time. I am not sure what this means but I think I may have failed in defining the who the owner of the npc was. I am not really sure how to do this but I might find a way, either way if there is a straight forward answer to this I would like to know.

Going to try and keep this as updated as I can.

Thanks
Size43 (Administrator) on 3 Jan 2018, 11:42:26
If it's retuning -1 the instance is not being synced. Maybe there are a few objects in the room already that don't get synced?
JamSnack (Topicstarter) on 16 Dec 2017, 21:46:14
Here is the alarm[0]:
if (gms_instance_is_owner(id))
{
image_blend = irandom(c_white);
gms_instance_set(id,"image_blend", image_blend)
point = choose(x+90,x-90,y+90,y-90)
}
alarm[0] = room_speed;
JamSnack (Topicstarter) on 30 Dec 2017, 21:43:11
THIS ISSUE HAS BEEN FIXED:

In my stupidity it seems I thought I could set an alarm to go off in 0 frames, which is impossible. The alarm event never ran in the first place and I also forgot to specify what kind of synchronization my instances needed. Alas I have made MANY improvements to the npc object AND fixed the bug.

Thank you for your time and I am sorry for pinning the blame on the extension. This bug was entirely my fault and actually costed me about 12 hours of work. Remember to be more careful when reviewing your code and that you cannot set alarms to 0 smh.
Size43 (Administrator) on 3 Jan 2018, 11:44:58
Oops, I missed this when I typed my other reply.