M
Mauricio Antunes
Guest
Hi, im trying to make one thing on my game.
I need that the user click on the button, after the button is pressed it will check if the global variable is higher than another one then will give an error if its true, if its false it will change room.
I don't know what happen because it always go for the next room and always pass the max number.
Can you guys help me? I tried a lot of things but in the end i tried the code that i paste here.
if (global.foodreserve >> global.foodstorageleft)
{
audio_play_sound(snd_errormsg,1,0);
}
if (global.foodreserve <= global.foodstorageleft)
{
global.foodowneddisplay = (global.foodowneddisplay + global.foodreserve);
room_goto(RM_002_MainGame);
}
I need that the user click on the button, after the button is pressed it will check if the global variable is higher than another one then will give an error if its true, if its false it will change room.
I don't know what happen because it always go for the next room and always pass the max number.
Can you guys help me? I tried a lot of things but in the end i tried the code that i paste here.
if (global.foodreserve >> global.foodstorageleft)
{
audio_play_sound(snd_errormsg,1,0);
}
if (global.foodreserve <= global.foodstorageleft)
{
global.foodowneddisplay = (global.foodowneddisplay + global.foodreserve);
room_goto(RM_002_MainGame);
}