• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

global variable not set

  1. G

    Global variable not set before reading

    Hi, I have an issue where the output says my global variable is not set before reading. The variable global.itemHeld is initiated in a separate initiation room by a persistant object. When a new object is created afterwards, it tries to access the variable upon creation. Here is the error: for...
  2. D

    Global variable not set, ini_read_real?

    Here's my code: if (global.cursory = 384) { scr_load() if global.playlevel = 1 { room_goto(rm_1_lvl_1) } if global.playlevel = 2 { room_goto(rm_1_lvl_2) } } Global.playlevel is set in scr_load, with a default value of 1...
  3. S

    Global variables dont work

    I created some global variables for my game but i cant acces them with any objects, not even the one that created the variables. note that this is all in my controller object ///create event global.cooldown = 0; ///global mouse left click event if global.cooldown = 0 {...
  4. S

    GML Where am I supposed to initialise global.variables? *Resolved* (Thanks Nocturne and NightFrost)

    I've been encountering this problem off and on for... basically since I started using GML. So, yes, I'm never going to be more than a hobbyist. I'm probably never going to publish or work with a team. So I'm always going to seem like a complete amateur. I freely admit that. I keep coming...
  5. J

    error: variable not set before reading

    I have a timer with a GM dialog with buttons for "OK" and "Cancel." The dialog pops up at the start of the timer, from the create event of obj_user_input. It asks the user to input a desired number of minutes. If I click OK, nothing bad happens, but if I click cancel, I get an error saying a...
  6. J

    error: global variable not set before reading it.

    The global variable that is not set before reading is declared in a persistent object that I place in the room (I only have one room right now). It's declared in the game start event. (I tried the room start event and got the same error.) global.orb_speed = 5; This persistent object is the...
Top