Variable Error

Version Game Maker 8

Pertaining to: Creating and calling variables


Okay, so I have been working with game maker recently and I am having a problem with creating variables for some reason. I have followed all the instruction I could find but I haven't had any luck.

1) This is in a create event:

  1. global.forestprogression = 0
  2. global.forestonechallengeattack = 0
  3. global.forestonelifeattack = 0
  4. global.forestonetimeattack = 0
  5. global.rainbowcoinforestone = 0
Expand to see the code.


2) In a separate object, there is another create event:

  1. if global.forestprogression >= 0 {
  2.  
  3. if (event_perform(ev_keypress,vk_space)) {
  4.  
  5. pick = show_message_ext("Enter?","Yes","No","");
  6.  
  7. if(pick == 1)
  8. {
  9.     room_goto("forestlevelone")
  10. }
  11.  
  12. if(pick == 2)
  13. {
  14.     show_message("You chose option 2!");
  15.    } } }
Expand to see the code.


I am getting an error that there is no such thing as any of the global variables that were in part one's script. I apologize for such a noobish question but I would really like to solve this as quickly as possible. Thanks for the time.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=70301