Space and symbol rules?

[lua]
strinvar = “awesome”

function awesomepants()
if stringvar == “awesome” then
print( “Yes!” )
end

concommand.Add(“awesomepants”, awesomepants)
[/lua]

Now the problem is I don’t know where to put ;'s or spaces or where to hit TAB.
I’ve never understood this.

Semi-colons are completely optional, as are tabs. I think spaces are also optional.

Why do people do it then?

Spaces, semi-colons and even newlines are all optional. Spaces between operators or in function arguments don’t matter much, but they make the code easier to read. Everyone you ever know will dislike you if you don’t indent( tab ) your code properly. Put a tab before every line in a function body, if statement or a loop and you will be ok. Semi-colons are allowed for people who come from c/c++.