• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - D&D Can't draw global variables to the screen?

Rossiter

Member
So, I've created a global variable in a "Game Start" event. Then, in a "Draw" event on the same object, I convert the global variable number (0 for the time being) to a string and store it in a new temporary variable before placing a draw value action to draw the value. When I run the program, I get an error labeled "Global variable index not set before reading". I tried to change the value to 100 instead of 0 and it didn't seem to work, and I specified an X and Y location as well. Anyone have any ideas?
 

FrostyCat

Member
The Game Start event won't run unless that object's instance is placed in the first room. Either you move the instance to the first room, or you use the Create event instead, or you move the global variable setup elsewhere. Read the Manual's entry on events and get a grip on when they run.
 
Top