unknown variable x

  1. FrostyCat

    GMS 2.3+ IMPORTANT!!! GM 2.3 Users Please Read! Improper script usage generates undefined variable errors

    Symptoms to Look For Expand for screenshot: The error is in the Create Event for object <undefined>. The subject is <unknown object> with a variable name that's either built-in or known to be already declared. The stack trace shows the source as something starting with gml_GlobalScript. For...
  2. D

    GMS 2 [SOLVED] Variable not set before reading it.

    Hello, everyone! I'm trying to understand the instance creation order and can't figure out why I can't read a variable in my case. I've got object "obj_current_weapon" where I try to do this: current_weapon_ammo = obj_no_weapon.ammo; "obj_no_weapon" code: entity = "no_weapon"; type =...
  3. KyleRansford

    GMS 2 Unknown Variable Error. Don't know What's Causing it

    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...
  4. M

    GML Unknown variable x when used with distance_to_object

    Hello, I've been using Game Maker for several months now, and I'm using Game Maker 8.0 Lite. One problem that I've been consistently having is the "unknown variable x" error. I have 21 total objects, and I'm not merging games, so I don't think that the problem comes from issues with Game Maker...
  5. E

    GML [Solved] Unknown variable x

    I have this weird error code. It says unknown variable x from the object obj_ball2. Currently there is no obj_ball2 in the room, but the code has "if object_exists(obj_ball2)" in it. ___________________________________________ ERROR in action number 1 of Step Event for object obj_classmate...