Run Lua code


Switch your luange to Lua ( CPU & GPU )

LuaMode

And input the code below :

hello.lua

a = 5+6
b = "PixelsWorld"
c = "is cool!"
d = time
e = pw.ch("slider",0)
f = "5 + 6 = " .. a .. "\nMessage : " .. b .. " " .. c .. "\nCurrent time is : " .. d .. " (s)\nValue of slider0 is : " .. e
pw.print(f)
  • a..b means combine variable a and b as string.
  • pw.print() reports message to debug window.
  • pw.ch() fetches the value of a specified parameters.
  • You are allowed to add ; in the end of each line, but it is not indispensable. Lua regards the \n(line break) as the end mark of one section of code.

results matching ""

    No results matching ""