setvar error

Hello All:

When i do a set var - i get an error like this
ERROR: Value not set for temp variable @RND0 uid 129

expression: SetVar(@RND0, RandD(0,TTM))

what am i doing wrong?

I put both of these into a screen and got no error:
SetVar(@RND0, RandD(0,TTM)) and showvar(@RND0, RandD(0,TTM))

I don’t know what you are doing wrong but I could not replicate.

Not sure this is what you are doing but, if you put that in a custom universe, you have to use setvar at the top prior to other instructions

Jerome

Thanks Jerome and David.
I am using this variable to create another variable. Could this be the source of error? It is a screen, not a universe

I don’t think you can nest custom equations/variables.
P123 needs to comment.