• Attepmt to compare boolean with number
    1 replies, posted
I changed a sound to my Airboat gun and error start showing. This is my code: [code] 167 if self.Owner:KeyReleased(IN_ATTACK) && (!self.Weapon:Clip1() <= 0) then 168 self:EmitSound("Airboat.FireGunRevDown") 169 end [/code] and error: [code] [ERROR] addons/airboat gun swep v3/lua/weapons/swep_airboatgun_v3.lua:167: attempt to compare boolean with number 1. unknown - addons/airboat gun swep v3/lua/weapons/swep_airboatgun_v3.lua:167 [/code]
Typo. (!self.Weapon:Clip1() <= 0) should be !(self.Weapon:Clip1() <= 0)
Sorry, you need to Log In to post a reply to this thread.