12-17-2020, 02:52 PM
(12-17-2020, 01:30 PM)Pedigree Wrote:(12-17-2020, 01:14 PM)goh Wrote: I was creating a solid bubble item (You know, from Mario Advance). But the error has occured!You are calling for .item variable before it has been set. Remove reference to the variable in the draw event and it should work fine. You cannot reference the object's variable when you are drawing it because the draw event happens before any other event on an object in Game Maker.
Check here:
Can anyone help me on this please?Code:
ERROR!!! :: ############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_solidbubble:
Variable obj_solidbubble.item(100225, -2147483648) not set before reading it.
at gml_Object_obj_solidbubble_DrawEvent_1 (line 1) - if item = 3 ############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_solidbubble_DrawEvent_1 (line 1)
(12-17-2020, 01:29 PM)Mors Wrote: As for your question, the error says that you did not set a variable called "item". Add a line like "item = 0;" to the create event of your object.
Draw event happens before create event in Game Maker so that will not work as far as I know, it will still throw this error.
I know. I'm using Game Maker Studio. Also another error occured too. Look here:
Code:
ERROR!!! :: ############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_solidbubble:
Variable obj_solidbubble.item(100225, -2147483648) not set before reading it.
at gml_Object_obj_solidbubble_DrawEvent_1 (line 1) - if item = 3 ############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_solidbubble_DrawEvent_1 (line 1)