error string vs hour
Posted: Sunday 29 January 2017 16:20
Hi, i'm encountering this error with my test blocky script which might open the roller shutter in the morning at 9Am if it's weekend.
I created another script and a variable "festivo" with string content which is sets to YES if it's saturaday or sunday, and to NO if it's a working day.
Attached the blocky script and here the error in the log:
Error: EventSystem: Lua script error (Blockly), Name: Buongiorno_Tapparelle_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare string with number
Thanks in advance to who can help me, cheers.
I created another script and a variable "festivo" with string content which is sets to YES if it's saturaday or sunday, and to NO if it's a working day.
Attached the blocky script and here the error in the log:
Error: EventSystem: Lua script error (Blockly), Name: Buongiorno_Tapparelle_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare string with number
Thanks in advance to who can help me, cheers.