i dont know what is wrong, but i tried to use it and didnt worked ._.
by the way,
look
set %r-num $rand(0,36)
if you will only use %r-num on this script you could use
var %r-num $rand(0,36)