Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help #78

Open
OfficialPixelBrush opened this issue Mar 1, 2019 · 3 comments
Open

Help #78

OfficialPixelBrush opened this issue Mar 1, 2019 · 3 comments

Comments

@OfficialPixelBrush
Copy link


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

local variable inst_object(100007, -2147483648) not set before reading it.
at gml_Script_htme_syncSingleVarGroup (line 119) - buffer_write(self.buffer, buffer_u16, inst_object);
############################################################################################

stack frame is
gml_Script_htme_syncSingleVarGroup (line 119)
called from - gml_Script_htme_syncInstances (line 31) - htme_syncSingleVarGroup(group,all);
called from - gml_Script_htme_step (line 29) - htme_syncInstances();
called from - gml_Object_obj_htme_StepNormalEvent_1 (line 2) - htme_step();

@The-any-Key
Copy link
Collaborator

The-any-Key commented Mar 3, 2019

The error show that you have manually removed a synced object but you did not call mp_unsync before or you mp_unsync it on the wrong side.

To destroy a synced object you call: mp_unsync() and then instance_destroy(). This means you can not have the mp_unsync() inside the destroy event code.

You can also only call mp_unsync() on the machine that created the object. Ex: P1 create and sync his own obj_player. This means only P1 can unsync and destroy it. After P1 unsync and destroy his obj_player. GMnet will remove it from the other players automatically.

To allow other players to destroy objects you need to send a RPC to force the "owner" of the object to destroy it. Or simulate (ex hit and hurt by something) and make sure the "owner" destroy the object.

@OfficialPixelBrush
Copy link
Author

It seems the Manual Page for RPCs is down https://gmnet-engine.org/manual/engine/tutorial/17_rpc
Mind helping on that front?

@The-any-Key
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants