Page 1 of 1

strange error..

Posted: Friday 10 March 2017 22:42
by R0yk3
i get this error:
2017-03-10 22:29:00.288 Error: EventSystem: Lua script error (Blockly), Name: huiskamer_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare number with string
2017-03-10 22:29:00.289 Error: EventSystem: Lua script error (Blockly), Name: huiskamer_2 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare number with string
2017-03-10 22:29:00.289 Error: EventSystem: Lua script error (Blockly), Name: huiskamer_3 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare number with string
2017-03-10 22:29:00.289 Error: EventSystem: Lua script error (Blockly), Name: huiskamer_4 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare string with number
With this script:
http://prntscr.com/eifrn1
Image

Each line apart works, only together i get the error..

Re: strange error..

Posted: Thursday 16 March 2017 15:17
by DutchHans
Hi maybe you should have the time between two times... If time ≥ 21.30 and time < 22.00 then...

Hope this helps.

Cheers,Hans

Re: strange error..

Posted: Friday 25 May 2018 22:11
by EDsteve
The reason is that you can use the "Level(%)" only in a DO statement and not in a IF-statement.
If you want to change that behavior: viewtopic.php?f=62&t=23584

Cheeers
ED

Re: strange error..

Posted: Saturday 23 May 2020 0:37
by ggorzki
EDsteve wrote: Friday 25 May 2018 22:11 If you want to change that behavior: https://www.domoticz.com/forum/viewtopi ... 62&t=23584
I also want to change that behavior, but the linked topic seems to be missing. What was there? Any workaround? Or just a request for a change? ;)

Re: strange error..

Posted: Wednesday 25 November 2020 6:28
by EDsteve
Hi,

the referred link did not point to a solution. It pointed to a thread where i tried to collect donations from the community to pay someone who can fix all the Blocky issues. Unfortunately the the admins didn't like that idea. So here we are still with the same unsolved Blocky problems.

So there is still no solution (with Blocky) for your problem