rand() not making sense

I am trying to generate a random number when an event is triggered.
I am using chop exec with the following expression:

args myrand; set myrand = rand(1.2); opparm logic2 boundmax $myrand;

However it only sets the parameter boundmax to ‘rand’ not an actual value. I’ve been trying different implementations of random but nothing seems to work without either only outputting ‘rand’ or an error in textport.

Any ideas?

You have to put backticks around the rand() expression