Wait Error with Variable Assignment (Polyscope3.13)

Hello, when I select a Variable “Wait for” it get this Error msg: (Type error : Unsupported operand ‘not’ for type Int) ?

Syntax error (for example ==VarName or =VarName or VarName)?

When I select the same direct value (25s) it’s working.
Polyscope3.13

Thank for your answer.


This is somewhat misleading. When you choose the “wait for variable” function, it is waiting for that variable to become TRUE or FALSE. It is not saying “wait for X amount of time” where X is your variable. In other words, it is not evaluating the variable and inserting its value as a delay time.

If you want to use a variable to control how long the robot waits for, use the “sleep()” script command and put your variable inside.

image

This command will evaluate the variable’s contents and sleep (wait) for the variable’s value in seconds. So sleep(2) is sleeping for 2 seconds.

1 Like

It’s clearer now! It would have been welcome to find this information in the documentation … Thank you very much!