Blockly sleep command not compiling correctly

jbr

New Member
I have found a problem when running the following code, sleep command is not being recognised correctly.

1543350297383.png

1543350350412.png

If I replace Blockly sleep time to 5s, it gets converted to into basic as sleep 2
 

hippy

Technical Support
Staff member
I would guess that's because SLEEP is in periods of 2.1 seconds and the conversion is doing Int(seconds/2.1) and that's rounding down to zero. If you change your "2" to "2.1" it should give SLEEP 1. It did when I tested it..

I'll file a report on that one.
 
Top