Running Lua Code


Switch the language to Lua (CPU & GPU)

LuaMode

Import the code:

hello.lua

version3()
a = 5+6
b = "PixelsWorld"
c = "is cool!"
d = time
e = slider(0)
f = "5 + 6 = " .. a .. "\nMessage : " .. b .. " " .. c .. "\nCurrent time is : " .. d .. " (s)\nValue of slider0 is : " .. e
print(f)
  • a..b concatenates variables a and b into a string.
  • print() renders the information on the screen.
  • slider() retrieves the value of the specified parameter.
  • You can add ; at the end of each line, although it's not necessary. Lua considers \n (newline character) as the end marker of a block of code.

Eventually, you will see the output information displayed at the top left corner of the screen.











results matching ""

    No results matching ""