KyleRansford
Member
I don't exactly know how to explain this error or what is going on, but I've tried lots of ways to fix this error message that keeps popping up.
It started when I was finishing adding a inventory (that works in a previous game) to a new game I'm working on. As I was finishing the code, I went to do a test run to see if everything was working and I got the following error message. I looked around and found a few typos, but they didn't fix the following error message.
To be clear I know what the "not set before reading it." error message means and there's nothing in the Create section of the "o_game" object pertaining to "oPlayer2" to begin with, which is why I don't know what's causing this error, nor is "oPlayer2" even mentioned in the "o_game" objects code.
So, to see if it was a "oPlayer2" issue, I deleted the "oPlayer2" object and i get the same error message only instead of it saying "oPlayer2" it went to the next object in the list which is "oEnemy1" as seen in the second error message.
The inventory works in a different game I have in development and I followed the code the way it was entered and worked in that game and it works in that game the way it should.
The inventory works by pausing the game and the inventory UI shows. But now it won't even let the game run.
To be clear, "checkInput" is a GML script that fully worked before adding the inventory code.
If anyone knows what might be going on here, any help would be appreciated.
It started when I was finishing adding a inventory (that works in a previous game) to a new game I'm working on. As I was finishing the code, I went to do a test run to see if everything was working and I got the following error message. I looked around and found a few typos, but they didn't fix the following error message.
To be clear I know what the "not set before reading it." error message means and there's nothing in the Create section of the "o_game" object pertaining to "oPlayer2" to begin with, which is why I don't know what's causing this error, nor is "oPlayer2" even mentioned in the "o_game" objects code.
So, to see if it was a "oPlayer2" issue, I deleted the "oPlayer2" object and i get the same error message only instead of it saying "oPlayer2" it went to the next object in the list which is "oEnemy1" as seen in the second error message.
The inventory works in a different game I have in development and I followed the code the way it was entered and worked in that game and it works in that game the way it should.
The inventory works by pausing the game and the inventory UI shows. But now it won't even let the game run.
To be clear, "checkInput" is a GML script that fully worked before adding the inventory code.
If anyone knows what might be going on here, any help would be appreciated.
Code:
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object o_game:
Variable oPlayer2.<unknown variable>(100012, -2147483648) not set before reading it.
at gml_Object_o_game_Step_0 (line 30) - if checkInput.pause_pressed_ {
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_o_game_Step_0 (line 30)
Exact Error Message on next run only with "oEnemy1"
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object o_game:
Variable oEnemy1.<unknown variable>(100012, -2147483648) not set before reading it.
at gml_Object_o_game_Step_0 (line 30) - if checkInput.pause_pressed_ {
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_o_game_Step_0 (line 30)