Quote:
Originally Posted by Devil_Lord2
I hate that! My first script I decided to work on was learning Dustys hammer and he did things sort of like that.. the missing brackets are the only reason I couldn't understand the parts I wanted to learn were
level.tiles[x,y];
and
updateboard(x,y,L,W);
|
Actually, having single like script blocks within if() or loops is common.
The problem in this case is he was asking about a
function without brackets.
PHP Code:
function onCreated() {
if (foo == bar) return true;
}
function onPlayerEnters() {
for (pl:players)
pl.chat = "Welcome!";
}
Both of which are used commonly. At that point, I think its a matter of preference whether you include brackets for 1 line codes.