Actually, nevermind, the problem must have been somewhere in your while loop. Now realizing that you have the correct formula, I edited your script and here is what worked:
alias ops.img {
var %ops.perc = $round($calc(($nick(#,0,o) / $nick(#,0)) * 10),0)
echo -a Ops:0,0--* 11,11 $+ $str(X,%ops.perc) $+ 1,1| $+ 14,14 $+ $str(X,$calc(10 - %ops.perc))
}
Since I am lazy to really discover why this happens, just try adjusting your script to that. ;P
Best wishes,
BloodHound