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