Jump to content
  • 0

Help..Error compiling l2jfree core after patching..pls help...


Question

Posted

Hello...i compile my l2jfree core(exactly:1.2.11) succesfuly by deafault but i have a problem compiling l2jfree core after applying patches...it says that cannot find symbols(at my .java files)...also at the files i have modified,there is a red exclamation point and in .java files for example my Buffs.java there is a qestion mark...can anyone help me with this? :-\

14 answers to this question

Recommended Posts

  • 0
Posted
  On 5/25/2009 at 8:10 PM, kostas852456 said:

Hello...i compile my l2jfree core(exactly:1.2.11) succesfuly by deafault but i have a problem compiling l2jfree core after applying patches...it says that cannot find symbols(at my .java files)...also at the files i have modified,there is a red exclamation point and in .java files for example my Buffs.java there is a qestion mark...can anyone help me with this? :-\

Symbols mean that there are missing things or wrongly defined. The errors are very specific, just read them and you'll easely solve them.

  • 0
Posted

Here is the problem exactly:

C:\Users\kostas\Desktop\workspace2\Core Version 1.2.11\src\main\java\com\l2jfree

\gameserver\handler\VoicedCommandHandler.java:[23,59] cannot find symbol

symbol  : class Buffs

location: package com.l2jfree.gameserver.handler.voicedcommandhandlers

 

C:\Users\kostas\Desktop\workspace2\Core Version 1.2.11\src\main\java\com\l2jfree

\gameserver\handler\VoicedCommandHandler.java:[51,35] cannot find symbol

symbol  : class Buffs

location: class com.l2jfree.gameserver.handler.VoicedCommandHandler

 

Here is my Buffs.java:

/* This program is free software; you can redistribute it and/or modify */

package com.l2jfree.gameserver.handler.voicedcommandhandlers;

 

import javolution.util.FastList;

import com.l2jfree.gameserver.datatables.BuffTemplateTable;

import com.l2jfree.gameserver.handler.IVoicedCommandHandler;

import com.l2jfree.gameserver.model.L2Skill.SkillType;

import com.l2jfree.gameserver.model.actor.instance.L2PcInstance;

import com.l2jfree.gameserver.network.SystemMessageId;

import com.l2jfree.gameserver.network.serverpackets.MagicSkillUse;

import com.l2jfree.gameserver.network.serverpackets.SystemMessage;

import com.l2jfree.gameserver.templates.L2BuffTemplate;

 

/**

* @author v

*

*/

public class Buffz implements IVoicedCommandHandler

{

    //private static final Log _log = LogFactory.getLog(Wedding.class);

    private static String[] _voicedCommands = { "fighterbuff","magebuff" };

 

    /* (non-Javadoc)

    * @see com.l2jfree.gameserver.handler.IUserCommandHandler#useUserCommand(int, com.l2jfree.gameserver.model.L2PcInstance)

    */

    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)

    {

        if(activeChar!=null)

        {

        FastList<L2BuffTemplate> _templateBuffs = new FastList<L2BuffTemplate>();

           

            boolean _wasInvul=false;

           

            if(command.startsWith("fighterbuff"))

            _templateBuffs = BuffTemplateTable.getInstance().getBuffTemplate(98);

            else

            _templateBuffs = BuffTemplateTable.getInstance().getBuffTemplate(99);

           

    if (_templateBuffs == null || _templateBuffs.size() == 0)

    return false;

           

    activeChar.setTarget(activeChar);

           

    //is this really need?

    double _mp=activeChar.getStatus().getCurrentMp(); //to disable mp consuming

   

    // for those who is invulnerable

    if(activeChar.isInvul()&&activeChar.isGM())

        {

        _wasInvul=true;

        activeChar.setIsInvul(false);

        }

   

            for (L2BuffTemplate _buff:_templateBuffs)

            {

                if ( _buff.checkPlayer(activeChar))

                {

               

                    // regeneration ^^ //is this really need?

                activeChar.getStatus().setCurrentMp(_mp);

                    String _name="";

                   

                    // some more functions depending on _buff name

                    if(_buff.getName().equalsIgnoreCase("RestoreHpMp")) {

                      MagicSkillUse msu = new MagicSkillUse(activeChar, activeChar, _buff.getSkillId(), _buff.getSkillLevel(), 110, 0);

                      activeChar.broadcastPacket(msu);

                      activeChar.getStatus().setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());

                      _name="Health and Mana Restoration";

                    }

                    else if(_buff.getName().equalsIgnoreCase("Heal")) {

                    MagicSkillUse msu = new MagicSkillUse(activeChar, activeChar, _buff.getSkillId(), _buff.getSkillLevel(), 110, 0);

                    activeChar.broadcastPacket(msu);

                    activeChar.getStatus().setCurrentHp(activeChar.getMaxHp());

                    _name="Health Restoration";

                    }

                    else if(_buff.getName().equalsIgnoreCase("Mana"))

                    {

                    MagicSkillUse msu = new MagicSkillUse(activeChar, activeChar, _buff.getSkillId(), _buff.getSkillLevel(), 110, 0);

                    activeChar.broadcastPacket(msu);

                    activeChar.getStatus().setCurrentMp(activeChar.getMaxMp());

                    _name="Mana Restoration";

                    }

                    else if(_buff.getName().equalsIgnoreCase("CP"))

                    {

                    MagicSkillUse msu = new MagicSkillUse(activeChar, activeChar, _buff.getSkillId(), _buff.getSkillLevel(), 110, 0);

                    activeChar.broadcastPacket(msu);

                    activeChar.getStatus().setCurrentCp(activeChar.getMaxCp());

                    _name="Combat Points Restoration";

                    }

                    else if (_buff.getSkill().getSkillType() == SkillType.SUMMON)

                    activeChar.doCast(_buff.getSkill());

                       

                    else

                    { 

                    // if this buff is first buff of this category - show animation

                    if(_templateBuffs.getFirst()==_buff){

                    MagicSkillUse msu = new MagicSkillUse(activeChar, activeChar, _buff.getSkillId(), _buff.getSkillLevel(), 200, 0);

                    activeChar.broadcastPacket(msu);

                    try{

                    Thread.sleep(200);//is this really need?

                    }catch (Exception f) {}

                    }

                    // buff process :D

                    _buff.getSkill().getEffects(activeChar, activeChar);

                    }

                    //text part

                    SystemMessage sm = new SystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);

                    if (_name.equalsIgnoreCase("")||_name==null)

                    sm.addSkillName(_buff.getSkill().getId());

                    else sm.addString(_name);

                    activeChar.sendPacket(sm);

                    sm = null;

                }

                else return false;

            }

            if(_wasInvul&&activeChar.isGM())

            {

            activeChar.setIsInvul(true);

            _wasInvul=false;

            } 

            return true;

        }

        else

            return false;

    }

   

    /* (non-Javadoc)

    * @see com.l2jfree.gameserver.handler.IUserCommandHandler#getUserCommandList()

    */

    public String[] getVoicedCommandList()

    {

        return _voicedCommands;

    }

}   

 

 

 

and my VoicedCommandHandler.java:

/*

* This program is free software: you can redistribute it and/or modify it under

* the terms of the GNU General Public License as published by the Free Software

* Foundation, either version 3 of the License, or (at your option) any later

* version.

*

* This program is distributed in the hope that it will be useful, but WITHOUT

* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more

* details.

*

* You should have received a copy of the GNU General Public License along with

* this program. If not, see <http://www.gnu.org/licenses/>.

*/

package com.l2jfree.gameserver.handler;

 

import javolution.util.FastMap;

 

import org.apache.commons.logging.Log;

import org.apache.commons.logging.LogFactory;

import com.l2jfree.Config;

import com.l2jfree.gameserver.handler.voicedcommandhandlers.*;

import com.l2jfree.gameserver.handler.voicedcommandhandlers.Buffs;

/**

* This class ...

*

* @version $Revision: 1.1.4.5 $ $Date: 2005/03/27 15:30:09 $

*/

public class VoicedCommandHandler

{

private final static Log _log = LogFactory.getLog(ItemHandler.class.getName());

 

private static VoicedCommandHandler _instance;

 

private FastMap<String, IVoicedCommandHandler> _datatable;

 

public static VoicedCommandHandler getInstance()

{

if (_instance == null)

_instance = new VoicedCommandHandler();

return _instance;

}

 

private VoicedCommandHandler()

{

_datatable = new FastMap<String, IVoicedCommandHandler>();

registerVoicedCommandHandler(new CastleDoors());

registerVoicedCommandHandler(new Hellbound());

registerVoicedCommandHandler(new Banking());

registerVoicedCommandHandler(new VersionInfo());

registerVoicedCommandHandler(new Buffs());       

if (Config.ALLOW_WEDDING)

{

registerVoicedCommandHandler(new Wedding());

 

}

             

 

_log.info("VoicedCommandHandler: Loaded " + _datatable.size() + " handlers.");

}

 

public void registerVoicedCommandHandler(IVoicedCommandHandler handler)

{

String[] ids = handler.getVoicedCommandList();

for (String element : ids)

{

if (_log.isDebugEnabled())

_log.debug("Adding handler for command " + element);

_datatable.put(element, handler);

}

}

 

public IVoicedCommandHandler getVoicedCommandHandler(String voicedCommand)

{

String command = voicedCommand;

if (voicedCommand.indexOf(" ") != -1)

{

command = voicedCommand.substring(0, voicedCommand.indexOf(" "));

}

if (_log.isDebugEnabled())

_log.debug("getting handler for command: " + command + " -> " + (_datatable.get(command) != null));

return _datatable.get(command);

}

 

/**

* @return

*/

public int size()

{

return _datatable.size();

}

}

 

 

 

  • 0
Posted

It says that when you build it? Go with ecplipse in The red errors and eclipse will help you to fix it..

  • 0
Posted

click there where is red in the java file or right click and eclipse will say you possible solutions..

  • 0
Posted
  On 5/30/2009 at 12:55 PM, TheEnd said:

click there where is red in the java file or right click and eclipse will say you possible solutions..

yea do quick fix

also if you can't manage to make it give us a screenshot on the java files

  • 0
Posted

Are you kidding?

The problem is written in there loool. The class is named "Buffz" not "Buffs" either change the pointer from "Buffs" -> "Buffz" or rename "Buffz" -> "Buffs"

  • 0
Posted

i did it...the same error...(It does not only happen with those codes...i cant put other codes too ex: online playets commands,commands for tvt and others...all of them say that cannot find symbol....

I tried to fix it with eclipse by going to red marks but it doesnt say anything that can help me...

  • 0
Posted

ya u are kidding lol... if its the same error than  u dont changed anything

 

public class Buffz implements IVoicedCommandHandler

 

to

 

 

public class Buffs implements IVoicedCommandHandler

  • 0
Posted
  On 5/31/2009 at 1:28 AM, kostas852456 said:

i did it...the same error...(It does not only happen with those codes...i cant put other codes too ex: online playets commands,commands for tvt and others...all of them say that cannot find symbol....

I tried to fix it with eclipse by going to red marks but it doesnt say anything that can help me...

Errors are there for some reason. If they're still there than you haven't modified what I told you to.

Anyway don't forget to install the commons.

  • 0
Posted

i changed buffz to buffs...the same..:/..i forgot to mention that I am using tags not trunk...in tags,eclipse doesnt help me to fix the errors...in trunk it helps me but i cant compile trunk cause it says that [iNFO] Unable to find resource 'l2jfree:l2j-commons:pom:1.3.0' in repository cen

tral (http://repo1.maven.org/maven2)

Downloading: http://www.l2jfree.com:8080/archiva/repository/internal//l2jfree/l2

j-mmocore/1.3.0/l2j-mmocore-1.3.0.pom

and it continues say thinks like that..:/...

there is the error again:

C:\Users\kostas\Desktop\workspace2\Core Version 1.2.11\src\main\java\com\l2jfree

\gameserver\handler\voicedcommandhandlers\Buffs.java:[7,43] cannot find symbol

symbol  : class SkillType

location: class com.l2jfree.gameserver.model.L2Skill

 

C:\Users\kostas\Desktop\workspace2\Core Version 1.2.11\src\main\java\com\l2jfree

\gameserver\handler\voicedcommandhandlers\Buffs.java:[12,39] cannot find symbol

symbol  : class L2BuffTemplate

location: package com.l2jfree.gameserver.templates

 

C:\Users\kostas\Desktop\workspace2\Core Version 1.2.11\src\main\java\com\l2jfree

\gameserver\handler\voicedcommandhandlers\Buffs.java:[30,18] cannot find symbol

symbol  : class L2BuffTemplate

location: class com.l2jfree.gameserver.handler.voicedcommandhandlers.Buffs

 

C:\Users\kostas\Desktop\workspace2\Core Version 1.2.11\src\main\java\com\l2jfree

\gameserver\handler\voicedcommandhandlers\Buffs.java:[30,64] cannot find symbol

symbol  : class L2BuffTemplate

location: class com.l2jfree.gameserver.handler.voicedcommandhandlers.Buffs

 

C:\Users\kostas\Desktop\workspace2\Core Version 1.2.11\src\main\java\com\l2jfree

\gameserver\handler\voicedcommandhandlers\Buffs.java:[54,17] cannot find symbol

symbol  : class L2BuffTemplate

location: class com.l2jfree.gameserver.handler.voicedcommandhandlers.Buffs

 

C:\Users\kostas\Desktop\workspace2\Core Version 1.2.11\src\main\java\com\l2jfree

\gameserver\handler\voicedcommandhandlers\Buffs.java:[90,64] cannot find symbol

symbol  : variable SkillType

location: class com.l2jfree.gameserver.handler.voicedcommandhandlers.Buffs

 

and as i told you it doesnt happen only with this voice command....it happens with all voice commands and i am making the changes correctly!!:/

  • 0
Posted

Read the damn errors. SkillType isn't a method in L2Skill, L2SkillType is.

Just pay attention to the errors and you'll work it out :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...