var/i
while(i==null)
sleep(10)
var/icon/hp=icon('BS.dmi')
hp.DrawBox(rgb(0,255,0),1,10,(round(usr.hp[usr.use]/usr.maxhp[usr.use])*100)-32,20)
icon = hp
icon_state = "4,1"
if(round(usr.hp[usr.use]/usr.maxhp[usr.use])*100<=32)
i=1
del(src)
Problem description:
round(usr.hp[usr.use]/usr.maxhp[usr.use])*100)-32 is zero has soon as usr.hp[usr.use] lose some point(it doesn't matter if it is one or more(and yes usr.hp[usr.use] is greater then 1) and don't tell I shouldn't use usr, because its inside a obj, after looking add the code a bit a found the problem, the first ) where placed wrong