How do I check the player's cash.

I'm trying to make a vending machine but I can't check the player's money to make sure they have enough... anyone know what to do?


I think you want to use the attribute game.pov.money.

For example:

If (game.pov.money >= 2) {
  msg ("You put ¤2 in the machine and a " + GetDisplayNameLink (CloneObjectAndMoveHere (banana), "object") + " comes out.")
  game.pov.money = game.pov.money - 2
}
else {
  msg ("You don't have ¤2 for the machine.")
}

(Off the top of my head)


It worked thank you very much.