mob/Stat()
//
statpanel("Stats")
stat("Level","[src.Level] ([src.MaxExp/src.Exp]%)")
mob
var
Exp = 0
mob
var
MaxExp = 100
There are no errors but I get this when I run it:
Lanzo Kuryuu (/mob): Stat()
Lanzo Kuryuu (/mob): Stat()
runtime error: Division by zero
proc name: Stat (/mob/Stat)
usr: Lanzo Kuryuu (/mob)
src: Lanzo Kuryuu (/mob)
call stack:
OVER AND OVER AND OVER AND OVER AND OVER!
In my statpanel it only shows the stats that are before "Level". How can I fix this?
PLUS, the percentage calculation is wrong.
% = (Exp*100)/Max_Exp
(explanation)
Also ,at the beggining of your code, add <font color=green>#define DEBUG</font>. On the runtime error, with DEBUG on, DS will display in which line the code was ''wrong''.
Post an update soon ;)