Engine:CCMD lua.lua edit: Difference between revisions

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>
Thus the first one works, the second doesn't, third does:
<kua>
context lua
function bob(s) print(s) end
bob("fred")
> fred
</kua>
<kua>
function bob(s)  -- Lua syntax error!!!
  print(s)
end
bob("james")
</kua>
<kua>
run `function bob(s)  -- Lua syntax error!!!
  print(s)
end`
bob("alan")
> alan
</kua>
</kua>