| zokemon |
08-22-2008 11:14 AM |
Quote:
Originally Posted by xXziroXx
(Post 1416434)
I agree on the player.level.name fix, but adding another bracket around it was just stupid. :noob:
|
It wasn't stupid, adding a parentheses around the entire expression was the pointless part.
This will work just find:
PHP Code:
setlevel2((player.guild == "Convict" && player.level != "era_prison-break.nw") ? "era_present_00-00.nw" : "era_prison-break.nw", 30, 30);
If you did want to keep those parentheses though, you could do something even cooler:
PHP Code:
setlevel2("era_" @ ((player.guild == "Convict" && player.level != "era_prison-break.nw") ? "present_00-00" : "prison-break") @ ".nw", 30, 30);
The comma operator will automatically parse the whole set of arguments and end whatever expression you put in the first argument of the function unless there is an unbalanced/unclosed parentheses (which should be fixed anyways). You can leave extra parentheses though, it just can be rather difficult (or at least annoying) when dealing with 3+ sets of them nested together.
|