Difference between revisions of "Lua to Luau conversion guide"
Line 1: | Line 1: | ||
+ | '''Gideros 2022.1 changed the interpreter from the Gideros flavour of Lua to the Gideros flavour of Luau.''' | ||
+ | |||
+ | Unlike regular Luau, Gideros Luau has the custom operators (bitwise, larger, smaller, trigonometry and integer divide) and easier syntax for arrays that you are used to with Gideros Lua. There are some slight differences however: | ||
+ | |||
'''Macros are no longer present, you will need to change macro constants to variables:''' | '''Macros are no longer present, you will need to change macro constants to variables:''' | ||
Revision as of 14:59, 31 December 2021
Gideros 2022.1 changed the interpreter from the Gideros flavour of Lua to the Gideros flavour of Luau.
Unlike regular Luau, Gideros Luau has the custom operators (bitwise, larger, smaller, trigonometry and integer divide) and easier syntax for arrays that you are used to with Gideros Lua. There are some slight differences however:
Macros are no longer present, you will need to change macro constants to variables:
e.g.
maxLives@5
change to:
maxLives=5
string.gsub patterns act slightly different when replacing a character that is special, you need to remove the second %:
e.g.
string.gsub(myString,"%+","%-")
change to:
string.gsub(myString,"%+","-")
Lua shaders need to have a slight change to the way they are defined:
e.g.
function vertex(vVertex,vColor,vTexCoord)
change to:
function vertex(vVertex,vColor,vTexCoord):Shader