A Random Creator
Member
Hello everyone!
I really don't know whats wrong with my code, maybe I'm just using Parents wrong.
Parent Code:
the child just uses the drag and drop inherit event code
My problem is vary confusing..
when I first open the game nothing is wrong, but when I create an object it crashes and says selected doesn't exist. so I try creating an object with out using that parent object but no mater what the crash says this:
also this happens with any object in the room (even the ones that don't have that parent)
I really don't know whats wrong with my code, maybe I'm just using Parents wrong.
Parent Code:
Code:
//Create
selected = 0
//Step
if(selected = 1) {
x = mouse_x
y = mouse_y
}
My problem is vary confusing..
when I first open the game nothing is wrong, but when I create an object it crashes and says selected doesn't exist. so I try creating an object with out using that parent object but no mater what the crash says this:
Code:
############################################################################################
FATAL ERROR in
action number 1
of Mouse Event for Left Pressed
for object obj_parent:
Push :: Execution Error - Variable Get 100099.selected(100301, -2147483648)
at gml_Object_obj_parent_LeftButtonPressed_1 (line 4) - if(cmSelected = 0 && selected = 0) {
############################################################################################