Use dynamic variable.
Note that /set doesn't use the '=' equal sign, assuming you have the variable set correctly:

Code:
var %i = 1
while ($var(slot.*,%i) != $null) {
  inc %nbrof. $+ $var(slot.*,%i).value
  inc %i    
}
%i = 1
while ($var(nbrof.*,%i) != $null) {
echo -a $gettok($v1,2,46) appeared $var(nbrof.*,%i).value time(s)
inc %i
}

Last edited by Wims; 15/06/15 09:12 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel