I watched a tutorial on LookVector today, happened to see this symbol ; on each end of every string that has = in it. Whats it for, exactly?
What's the ; semicolon symbol in scripting?
2 answers
I don't have a concrete answer but as far as i know it doesn't make a difference. I think it's used more to "fancy" up the script.
It functions as a regular comma and can be used interchangeably in a table.
local table1 = {
1,2,3;4
}
It can also be used at the end of each line of code to increase programmer readability.
function test();
print("foobar");
end;
In standard programming languages semicolons are used to signify to a compuer that a new line of code has been introduced.
However, LUA is a simplified language and does not require this. Even if you were to add semicolons after every line it wouldn't matter.
The reason other developers may type semicolons is because they're used to other programming languages and type them out of habit because they're used to seeing critical errors if they didn't.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
So its useless, I guess all strings that use this cant go foobar either way.
In other programming languages its used as a
statement separator. Lua doesn't need such a concept but languages likeC++require this.