I've seen some scripts use ; at the end of a line, is it mandatory? Example:
function print(msg)
print(msg);
end; --Here it is
I know you MUST do this in C# but is it mandatory in Lua?
I've seen some scripts use ; at the end of a line, is it mandatory? Example:
function print(msg)
print(msg);
end; --Here it is
I know you MUST do this in C# but is it mandatory in Lua?
No, semi colons are not mandatory in Lua, however, Lua does recognize them. So you should not have any issues if you place them at the end of your lines.
As a fellow C# programmer, this habit is almost second nature to me. Thankfully it will not hinder anything in Lua.
From what I can see, you only need to use semi colons if you are writing multiple statements on the same line. Although, that is usually discouraged.
I think it's just like commas, just not commas.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Alright. Thanks for the info.
The last part is wrong information .-.