Hi, I'm having some problems using $calc to work out an average for me. The code I'm using is:
msg #You have got %TB.Correct. [ $+ [ $address($nick,4) ] ] $&
correct out of %TB.Goes. [ $+ [ $address($nick,4) ] ] tries.$&
This is from a total of %TB.Wires. [ $+ [ $address($nick,4) ] ] wires,$&
with an average of$&
$calc(%TB.Wires. [ $+ [ $address($nick,4) ] ] / %TB.Goes. [ $+ [ $address($nick,4) ] ]) wires per go.
This code correctly sends the numbers in the first half (or as I suspect, the text version of the numbers), but the $calc returns a 0 everytime. When doing some debugging by getting the code to msg just values such as
%TB.Wires. [ $+ [ $address($nick,4) ] ]
and
$calc(%TB.Wires. [ $+ [ $address($nick,4) ] ])
, I've found that the variables return as numbers (or text) but if placed inside a $calc, they return as 0. Any thoughts?