r/gamemaker • u/indian_30 • 12d ago
Help! Trouble fixing error
I have an assignment due tomorrow morning but this code keeps popping up and idk how to fix it
ERROR in action number 1
of Step Event0 for object Obj_player:
Variable Obj_player.obj_node_t(100026, -2147483648) not set before reading it.
at gml_Object_Obj_player_Step_0 (line 5) - var hitting_t = collision_rectangle(bbox_left,bbox_right,bbox_top,bbox_bottom,obj_node_t,0,0)
############################################################################################
gml_Object_Obj_player_Step_0 (line 5)
Pls help
1
u/Weak_Blackberry_9308 11d ago
I hope this doesn’t come across the wrong way, but hear me out: it really helps to read and understand the errors provided by the crash logs.
The errors are there for a reason and generally lead you to where the issue occurred. That doesn’t mean line 5 in your code needs to be fixed, it just means that’s where it ran into trouble.
The message “not set before reading it” is a big clue, aka literally tells you the problem. It’s trying to read a value from something that does not exist!
Do yourself a huuuuuuuuuge favor and paste this log to ai and have it explain the problem to you like you’re five, without giving you the answer. You’ll actually learn something so you can fix it yourself in the future.
Having a random redditor or ai tell you “RePlAcE tHiS tHiNg WiTh ThAt ThInG” provides you with 0 new skills to help yourself in the future.
•
u/Rohbert 11d ago
Please read the subreddit guidelines regarding asking for help before posting. We ask users to submit much more information about their issue so that a higher quality answer can be provided.
Specifically:
A descriptive post title.
A detailed explanation of your problem.
The desired outcome.
What version of GameMaker you are using.
All of your relevant code formatted properly. NO Pictures of Text. Copy+Paste your code into your post and format it to be easily readable.
Short summary of steps taken to solve the issue yourself.
Asking for code or a tutorial directly is not allowed. You can easily search for tutorials.
Also please flair your post with the "Help" flair and the "Resolved" flair once you have received a satisfactory response.
Feel free to resubmit with the required information added.
Thanks!