ID:143531
 
Code:
client/Center()
if(usr.bowonshort!=1 || usr.bowonf!=1)
usr.Attack()
else
if(usr.bowonshort==1)
usr.shoot()
if(usr.bowonf==1)
usr.shootf()


Problem description:
I want the thing to check if bows are equiped and if they are shoot for the bow that is equipped I know the procs work just that if(.bowonf==1) is not working!

Please read this to see something you're doing wrong there; http://bwicki.byond.com/ByondBwicki.dmb?TrueFalse .

Also, in a client proc, you should use mob instead of usr for most purposes.

As for your "actual" problem, use a debug message:

client/Center()
world << "[mob.bowonshort], [mob.bowonf], [mob.bowonshort], [mob.bowonf]"
if(mob.bowonshort!=1 || mob.bowonf!=1)
mob.Attack()
else
if(mob.bowonshort==1)
mob.shoot()
if(mob.bowonf==1)
mob.shootf()


When Center() is called, it'll tell you the value of all the variables involved and so you can follow what's happening.
In response to Abhishake
Still not working it is giving back the right 1 or 0 but not firing if it is 1!!!!

ps. I tested the proc it works I replaces it with attack and I know the bowonf() works so somehow the problem is in this piece of code.