49
edits
| (2 intermediate revisions by the same user not shown) | |||
| Line 37: | Line 37: | ||
run `print(1+2);print(1+2)`;exit | run `print(1+2);print(1+2)`;exit | ||
</kua> | </kua> | ||
And this fails because 'if', 'print', and 'end' are in separate script statements: | |||
<kua> | <kua> | ||
context lua | context lua | ||
if bob then -- Lua errer! | |||
print(1 + 2) | |||
print( | |||
end | end | ||
</kua> | </kua> | ||
These work: | |||
<kua> | <kua> | ||
run ` | context lua | ||
print( | run `if bob then | ||
print(1 + 3) | |||
end` | end` | ||
bob( | if bob then print(1 + 4) end | ||
</kua> | </kua> | ||