View Single Post
Old 09.11.2005, 17:20   #2
StaticVoid
Архивный участник
 
Join Date: Oct 2005
Posts: 18
Default

Code:
push_event // myself 
push_const 28 
add 
fetch_i // sm 
push_const 2400 
add 
fetch_i // hp 
push_const 344 
add 
fetch_d 
push_event // myself 
push_const 28 
add 
fetch_i // sm 
push_const 2400 
add 
fetch_i // max_hp 
push_const 1000 
add 
fetch_d 
push_const 1xx.xx0000 
div 
push_const xx.xx0000 
mul 
greater 
shift_sp 1 
func_call 175 // func[Despawn] 
shift_sp -1
I don't see any reason why the above code portion shouldn't parse. When you are saying that it doesn't parse you mean that the reading of ai.obj fails?

From a semantic point although you make the fetches and the correct calculations and you have in the stack the boolean result of hp>90*maxhp/100 you do not use it (at least not in the above code) and the function Despawn is called no matter what. If you want to call despawn only if the hp are less than 95% of the maxhp then you should add a branch_true <label> after the greater statement to jump over the despawn function.

In which handler do you have the above code?
StaticVoid is offline