featurelist.orgfeaturelist.org
 
U
D
-1 points - posted 3488 days ago by HDPE - status: Active - 2 comments watch embed this
I'd like to see a feature concerning IF statements where scripters can use an '}else{' function.

This might keep the code much more clean and easier to read.

How it is now:

If(servervar(a) == 1) do
{
es
msg a is 1!
}
If(servervar(a) != 1) do
{
es
msg a is not 1!
}

but how I'd like it to see:

If(servervar(a) == 1) do
{
es
msg a is 1!
}else{
es_msg a is not 1!
}

Venjax posted on 2008-04-02 07:51:55
Eventscripts can do "else do"

if(servervar(a) == 1) do
{
es
msg a is 1
}
else do
{
es_msg a is not 1!
}

* www.eventscripts.com/pages/else

PatPeter posted on 2009-11-28 02:27:22
Yep, else do does that fine, I would like to see EventScripts compatibility with movable brackets though.

if (x < 3) do {
esmsg x is less than 3!
} else {
es
msg x is not less than 3!
}

Saves lines and would make it like other languages.