Greater than error [SOLVED]

I'm making a game with a turn based combat system. But i have found that when attacking an enemy, Quest throws an error saying something about things not being defined for ">" on integers and strings. It was working fine before, and seems to only happen with some of the weapons. I have it set up so that when attacking, it checks for the player's ammo count. Like this :

if (player.ammo > 0) {
    [enemy name here].hp = [enemy name here].hp - player.dmg
else {
    msg ("Out of ammo")

Never mind. It was a problem with one of the guns configured to have infinite ammo. Apparently something wasnt working with the "infinite" set as the maximum ammo. I set it to 9999 and made it change to 9999 everytime ammo went down and its working now.

make sure your Attributes are Integer Attributes and not String Attributes

This topic is now closed. Topics are closed after 60 days of inactivity.