blockly-lua icon indicating copy to clipboard operation
blockly-lua copied to clipboard

[Question] Dealing with return values.

Open theoriginalbit opened this issue 11 years ago • 0 comments

In regards to when specifying the return type of a block, for example

this.setOutput(true, 'Boolean')

is this enforced in anyway when it comes to Blockly-lua?

The main reason that I ask is because of turtle.getFuelLevel returning a number when fuel is enabled, but when fuel is disabled it will return "unlimited" which as you can see is a string.

Oh also while I'm here, this also relates to #2, most of the turtle functions now days in the latest few CC versions return 2 values, the first being success of operation, the second being the reason it failed (when it does).

theoriginalbit avatar Nov 05 '13 04:11 theoriginalbit