# Wait Error with Variable Assignment (Polyscope3.13)

**URL:** <https://forum.universal-robots.com/t/wait-error-with-variable-assignment-polyscope3-13/17573>\
**Category:** Technical Questions\
**Created:** [November 12, 2021, 1:33pm UTC](https://forum.universal-robots.com/t/wait-error-with-variable-assignment-polyscope3-13/17573 "2021-11-12T13:33:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thierry.bourgeois](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@thierry.bourgeois](https://forum.universal-robots.com/u/thierry.bourgeois)\
**Post date:** [November 12, 2021, 1:33pm UTC](https://forum.universal-robots.com/t/wait-error-with-variable-assignment-polyscope3-13/17573/1 "2021-11-12T13:33:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![thierry.bourgeois](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@thierry.bourgeois](https://forum.universal-robots.com/u/thierry.bourgeois)\
**Post date:** [November 12, 2021, 1:34pm UTC](https://forum.universal-robots.com/t/wait-error-with-variable-assignment-polyscope3-13/17573/2 "2021-11-12T13:34:27Z")

</div>

![WaitAssignError](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/9/9c31cfb10351d9bc6b13901353f9a6d0e0d8ce9f.jpeg)  
 ![WaitAssignErrorMsg](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/c/caebdc43bfab7abe3cb2390622c59a48ac248c5c.jpeg)

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [November 12, 2021, 6:40pm UTC](https://forum.universal-robots.com/t/wait-error-with-variable-assignment-polyscope3-13/17573/3 "2021-11-12T18:40:07Z")

</div>

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](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/b/b31a55f87ae7940ded5300c6ac5c37294ed8efb1.png)

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.

---

<div class="post-metadata">

**Author:** ![thierry.bourgeois](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@thierry.bourgeois](https://forum.universal-robots.com/u/thierry.bourgeois)\
**Post date:** [December 21, 2021, 7:47am UTC](https://forum.universal-robots.com/t/wait-error-with-variable-assignment-polyscope3-13/17573/4 "2021-12-21T07:47:55Z")

</div>

> [@eric.feldmann](#):
>
> 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 ro

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