• 0

WTF is going on

Question

// Same thing if the Character isn't a Noblesse Blessed L2PlayableInstance
else if (this instanceof L2Playable && ((L2Playable)this).isNoblesseBlessed())
{
((L2Playable)this).stopNoblesseBlessing(null);

if (((L2Playable)this).getCharmOfLuck()) //remove Lucky Charm if player have Nobless blessing buff
((L2Playable)this).stopCharmOfLuck(null);
}
else


and i got this error


[javac] Compiling 1298 source files to C:\L2GateAway\L2JGateway\L2J_CORE\build\classes
[javac] C:\L2GateAway\L2JGateway\L2J_CORE\java\com\it\br\gameserver\model\L2Character.java:1513: 'else' without 'if'
[javac] 		else if (this instanceof L2PlayableInstance && ((L2PlayableInstance)this).isPhoenixBlessed())
[javac] 		^
[javac] 1 error


Recommended Posts

• 0

'else' without 'if'


show us more code before that else

Share on other sites

• 0

show us more code before that else

i just put one line on it lawl

Share on other sites

• 0

i just put one line on it lawl

nvm, i found what is it

        	if (((L2Playable)this).getCharmOfLuck()) //remove Lucky Charm if player have Nobless blessing buff
((L2Playable)this).stopCharmOfLuck(null);
}


change to

if ( ( (L2Playable)this).getCharmOfLuck())   {      //remove Lucky Charm if player have Nobless blessing buff

• 0

100 errors :/

Share on other sites

• 0

100 errors :/

i mean to just put the {

anyway, i will take a look at the complete L2character, sec

• 0

okz

Share on other sites

• 0

i removed

if (((L2Playable)this).getCharmOfLuck()) //remove Lucky Charm if player have Nobless blessing buff


will it work?

i got succesfull build but i am not sure that will work

Share on other sites

• 0

ok, when some1 copy the code here, it lose some spaces

       // Same thing if the Character isn't a Noblesse Blessed L2PlayableInstance
else if (this instanceof L2Playable && ((L2Playable)this).isNoblesseBlessed())
{
((L2Playable)this).stopNoblesseBlessing(null);

if (((L2Playable)this).getCharmOfLuck()) //remove Lucky Charm if player have Nobless blessing buff
((L2Playable)this).stopCharmOfLuck(null);
}
else
stopAllEffectsExceptThoseThatLastThroughDeath();



all that is ok, you should take a look here (the if before your code)

// Stop all active skills effects in progress on the L2Character,
// if the Character isn't affected by Soul of The Phoenix or Salvation
if (this instanceof L2Playable && ((L2Playable)this).isPhoenixBlessed())
{
if (((L2Playable)this).getCharmOfLuck()) //remove Lucky Charm if player has SoulOfThePhoenix/Salvation buff
((L2Playable)this).stopCharmOfLuck(null);
if (((L2Playable)this).isNoblesseBlessed())
((L2Playable)this).stopNoblesseBlessing(null);
}


without this if, you cant have a else

If you want to not lose buffs when die, just delete

else
stopAllEffectsExceptThoseThatLastThroughDeath();


but take a look at all things that could happen with this.

EDIT

i removed

if (((L2Playable)this).getCharmOfLuck()) //remove Lucky Charm if player have Nobless blessing buff


will it work?

i got succesfull build but i am not sure that will work

if you remove that, then you will allways try to

((L2Playable)this).stopCharmOfLuck(null);


even if you dont have it

Share on other sites

• 0

ok but what i must write in order to go not loosing buffs on death cause y confused me

Share on other sites

• 0

// Stop all active skills effects in progress on the L2Character,
// if the Character isn't affected by Soul of The Phoenix or Salvation
if (this instanceof L2Playable && ((L2Playable)this).isPhoenixBlessed())
{
if (((L2Playable)this).getCharmOfLuck()) //remove Lucky Charm if player has SoulOfThePhoenix/Salvation buff
((L2Playable)this).stopCharmOfLuck(null);
if (((L2Playable)this).isNoblesseBlessed())
((L2Playable)this).stopNoblesseBlessing(null);
}
// Same thing if the Character isn't a Noblesse Blessed L2PlayableInstance
else if (this instanceof L2Playable && ((L2Playable)this).isNoblesseBlessed())
{
((L2Playable)this).stopNoblesseBlessing(null);

if (((L2Playable)this).getCharmOfLuck()) //remove Lucky Charm if player have Nobless blessing buff
((L2Playable)this).stopCharmOfLuck(null);
}
else
stopAllEffectsExceptThoseThatLastThroughDeath();



this have 3 steps

-check if the char has salvation

-else check if the char has noblesse

-else delete all buffs

so you can chose, to

a) remove salvation and noblesse (if the char has this buffs), but never remove normall buff

then delete

else
stopAllEffectsExceptThoseThatLastThroughDeath();


b) never remove salvation, noblesse or any other buff

then delete all the code quoted in the post (from

// Stop all active skills effects in progress on the L2Character,
// if the Character isn't affected by Soul of The Phoenix or Salvation
if (this instanceof L2Playable && ((L2Playable)this).isPhoenixBlessed())


to

else
stopAllEffectsExceptThoseThatLastThroughDeath();



Share on other sites

• 0

ah ok now 11 errors man anyway i wont aDd this

Share on other sites

• 0

ah ok now 11 errors man anyway i wont aDd this

post here the whole doDie function, or at least where are those errors

Share on other sites

• 0

no ok i wont add it

Share on other sites

• 0

someone realy sucks at java here ^^

Share on other sites

• 0

not me the code was posted badly no + - or where to put something just a shit code nevermind i will add other things

Share on other sites

This topic is now closed to further replies.

• Posts

• today a server over 100 is not worth it because today there are no players to play and secondly a person who will open a server has to face a thousand and two problems one attack from Attack can take the server offline in seconds and one who has given so much money he will see his hard work destroyed Also he will have to find people and well to play on the server and which ones are with dropper there will be no people to play and also he will have to give a lot of money for ads and so on which the this effort will be wasted, there is no one to play seven anymore, think about the shops that have all kinds of things, no one buys them, it's not worth it And also the big sites like topzones and hopzones are a big scam these big sites All they want is money and they have all the elements of your service which they make the first people to hit you because they just have their own servers and own servers always have people   if things really weren't like this this man here would have it running and now it would have people in it It just doesn't have people and he saw that it's not worth it and then whoever buys it will definitely regret it and you'll sell it for half price but don't buy this wait for someone soft who will have bought it and you will get it even cheaper thanks
• That should be inside CharInfo with no doubt
• Updated   - Lucera 2 Community Board + PSD + Edit textures [Interlude] - LumosDH V2.8 [Interlude] Preview Album
• WTS DB NO SA +25 TO L2 ELITE X45 30EUROS PM ME