Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What does ; means in lua? [closed]

Asked by
Kyokamii 133
8 years ago

This question already has an answer here:

How do I use the semicolon ; symbol?

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?

Marked as Duplicate by BlueTaslem

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

2 answers

Log in to vote
1
Answered by
Necrorave 560 Moderation Voter
8 years ago

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.

0
Alright. Thanks for the info. Kyokamii 133 — 8y
0
The last part is wrong information .-. User#5978 25 — 8y
Ad
Log in to vote
-2
Answered by 8 years ago

I think it's just like commas, just not commas.