#"other" variables have stopped working all throughout my code. plz help

10 messages · Page 1 of 1 (latest)

rose jungle
#

for example ive got some code that is used as a slide transition but it keeps giving me this error:


############################################################################################
ERROR in
action number 1
of <Unknown Event>
for object oTestButton:

Unable to find instance for object index 16777214
at gml_Object_oTestButton_Gesture_0 (line 1) - target=Test; SlideTransition(TRANS_MODE.GOTO,other.target);
############################################################################################
gml_Object_oTestButton_Gesture_0 (line 1)

.

#

another example is here in my players script the weapon they are holding uses the same logic as the enemies weapon mentioned before and im getting this error message:


############################################################################################
ERROR in
action number 1
of Create Event
for object oPlayer:

Unable to find instance for object index 16777214
at gml_Object_oPlayer_Create_0 (line 40) - owner=other.id ;
############################################################################################
gml_Object_oPlayer_Create_0 (line 40)

#

a key issue ive got is, i havent changed my oPlayer code in ages but suddenly its just stopped working alongside every single object that uses "other" at some point

limber hound
#

hard to help without code but its probably the update, just set the variables to something before in some create event, the game is trying to read them before they exist

sterile smelt
#

Where is other being used here? It kind of looks like you might be using other in contexts where it doesn't resolve to anything, and so it was working by coincidence before but not anymore

#

like here's it's in line 1 of a gesture event, but other doesn't work like that outside of collision events

rose jungle
#

@limber hound heres the code thats causing the issue. its all in the create event of oPlayer

#

the thing that confuses me however is the fact that ive used this code for the last 2 years. never changed it or anything to do with said code but suddenly its just stopped working

rose jungle
#

so i just did some tests in an older game i made, and the code works fine. however in this project specifically it does not. 🤔