Wowwee MIP V2 icon Wowwee MIP V2 UART interface to hack WowWee MIP with ESP32/ESP32‑Cam or EZ‑B v4 for ARC; hardware UART preferred, configurable power and baud 9600/115200 Try it →
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) Print("Hello") EndIf

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

Am I doing something wrong?


ARC Pro

Upgrade to ARC Pro

Don't limit your robot's potential – subscribe to ARC Pro and transform it into a dynamic, intelligent machine.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#1  

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)
Print("Hello")
EndIf
#2  

Thanks DJ.

I should kick myself for not trying small "and". (I was actually using "And" first and then tried your example.)

Author Avatar
United Kingdom
LinkedIn Twitter Google+ YouTube
#3  

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]