What i want to happen:
When the player collides with a stool, if he press's Z he will be asked if he wants to buy a heart.
If he says yes then the computer will check to see if he has more than 24 rubys (the currency in my game)
If the player does, than his heart container increases by 50. If not you are told that you do not have enough rubys.
I am using this code:
COLISION EVENT WITH obj_player:
message_background(box_old_man)
message_button(text_button)
if keyboard_check(ord('Z')) {show_question("Would you like to buy a hearts? they refill half your container and cost 25 ruby's."){if global.money<24{health=50} if global.money>24{show_message("sorry, but you do not have enough rubys.")}}
}But nothing is working. (i do not get the question or anything, could someone fix the code?











