Welcome to Synthiam!

Program robots using technologies created by industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation, and artificial intelligence easy.

Get Started
Asked — Edited

If Statement With And

If I define $Day and $Hour in your example:

$Day = 2
$Hour = 3
If ($Day = 2 AND $Hour = 3)

I get an error message: Invalid token in expression [AND]

Am I doing something wrong?


Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

AI Support Bot
Related Content
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
That's funny, just yesterday i noticed that capitalized AND didn't work so i fixed it for the next release. In the meantime until the next release, use lower case "and". I was missing a flag on the regex parse:)


$Day = 2
$Hour = 3

If ($Day = 2 and $Hour = 3)
Thanks DJ.

I should kick myself for not trying small "and". (I was actually using "And" first and then tried your example.)
United Kingdom
The same happens for OR as I found yesterday but thought it was me until I found this topic:)

Error on line 23: Invalid token in expression: [OR]