Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

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:

Code:
global.forestprogression = 0

global.forestonechallengeattack = 0

global.forestonelifeattack = 0

global.forestonetimeattack = 0

global.rainbowcoinforestone = 0

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

Code:
if global.forestprogression >= 0 {

 

if (event_perform(ev_keypress,vk_space)) {

 

pick = show_message_ext("Enter?","Yes","No","");

 

if(pick == 1)

{

    room_goto("forestlevelone")

}

 

if(pick == 2)

{

    show_message("You chose option 2!");

   } } }

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.
 
I am fond of watching an playing games.in my free time i always download new games for my entertainment. one day i visited your website and i was so impressed via game making process as well as variable error. in game making people got an errors like connection problem, downloading problem, sound and picture problem. here i can read lots of more about the variable error.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top