View Single Post
  #4  
Old 08-22-2008, 11:14 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by xXziroXx View Post
I agree on the player.level.name fix, but adding another bracket around it was just stupid.
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"3030); 
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"3030); 
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.
__________________
Do it with a DON!
Reply With Quote