Page 1 of 1

[HELP] Siege Announce Error

Posted: Fri Mar 18, 2011 5:06 pm
by MrPorN
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: 7829
L2JDP Revision Number: 4521


Hello everyone,

I was editing the core this evening,so when sieges were starting,an announcement would be shown.
But when i edited the lines so when a Clan will take a castle during siege,using this line:

Code: Select all

    /**     * When control of castle changed during siege<BR><BR>     */    public void midVictory()    {        if (getIsInProgress()) // Siege still in progress        {            if (getCastle().getOwnerId() > 0)                   Announcements.getInstance().announceToAll(""+player.getClan().getName()+" has taken "+getCastle().getName()+" Castle.");            _siegeGuardManager.removeMercs(); // Remove all merc entry from db                        if (getDefenderClans().isEmpty() && // If defender doesn't exist (Pc vs Npc)                    getAttackerClans().size() == 1 // Only 1 attacker            )            {                L2SiegeClan sc_newowner = getAttackerClan(getCastle().getOwnerId());                removeAttacker(sc_newowner);                addDefender(sc_newowner, SiegeClanType.OWNER);                endSiege();                return;            }
The following part is not correct:

Code: Select all

+player.getClan().getName()+"
I've used it more than 5 times in Siege.java and it works ok.
Any suggestions?

- Thanks in advance,
Mr.PorN

Re: [HELP] Siege Announce Error

Posted: Sat Mar 19, 2011 2:26 am
by tukune
if (getCastle().getOwnerId() > 0)
_siegeGuardManager.removeMercs(); // Remove all merc entry from db

-->

if (getCastle().getOwnerId() > 0)
{
Announcements.getInstance().announceToAll("brabra");
_siegeGuardManager.removeMercs(); // Remove all merc entry from db
}

Re: [HELP] Siege Announce Error

Posted: Sat Mar 19, 2011 10:12 am
by MrPorN
tukune,

Thanks for reply but check the error that i'm having.
I can not understand why it doesn't accept the following code.

Code: Select all

"+player.getClan().getName()+"
I have used more than 5 times and it's working fine.

http://img576.imageshack.us/f/errorcc.jpg/

- Thanks in advance,

Mr.PorN

Re: [HELP] Siege Announce Error

Posted: Sun Mar 27, 2011 8:55 pm
by MrPorN
bump :cry:

Re: [HELP] Siege Announce Error

Posted: Tue Mar 29, 2011 8:15 pm
by MrPorN
bump again,please i need help.

:( :(