Jump to content
  • 0

[HELP]Java Prob


Question

Posted

Ok Paidia Meta Apo to English Ir8a edo opos ziti8ike tespa

 

Ekana oti katalaba kai m ebgale afto to error tora

 

    [javac] Compiling 1463 source files to C:\Users\elias\workspace\L2_GameServer 2.4\build\classes

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\model\actor\instance\L2FolkInstance.java:89: cannot find symbol

    [javac] symbol  : method getCanLearn(com.l2jserver.gameserver.model.base.ClassId)

    [javac] location: class com.l2jserver.gameserver.model.L2Skill

    [javac] if (sk == null || !sk.getCanLearn(player.getClassId()) || !sk.canTeachBy(npcId))

    [javac]                     ^

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\model\actor\instance\L2FolkInstance.java:89: cannot find symbol

    [javac] symbol  : method canTeachBy(int)

    [javac] location: class com.l2jserver.gameserver.model.L2Skill

    [javac] if (sk == null || !sk.getCanLearn(player.getClassId()) || !sk.canTeachBy(npcId))

    [javac]                                                             ^

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\network\clientpackets\RequestJoinParty.java:111: cannot find symbol

    [javac] symbol  : variable player

    [javac] location: class com.l2jserver.gameserver.network.clientpackets.RequestJoinParty

    [javac] if (((p2.isTeam1Member() && player.isTeam2Member()) || (p2.isTeam2Member() && player.isTeam1Member())) && Config.ENABLE_FACTION_ENGINE)

    [javac]                             ^

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\network\clientpackets\RequestJoinParty.java:111: cannot find symbol

    [javac] symbol  : variable player

    [javac] location: class com.l2jserver.gameserver.network.clientpackets.RequestJoinParty

    [javac] if (((p2.isTeam1Member() && player.isTeam2Member()) || (p2.isTeam2Member() && player.isTeam1Member())) && Config.ENABLE_FACTION_ENGINE)

    [javac]                                                                               ^

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\network\clientpackets\RequestJoinParty.java:113: cannot find symbol

    [javac] symbol  : variable player

    [javac] location: class com.l2jserver.gameserver.network.clientpackets.RequestJoinParty

    [javac]     player.sendMessage("You Cant Trade with the Different Faction");

    [javac]     ^

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\network\clientpackets\RequestRestartPoint.java:183: cannot find symbol

    [javac] symbol  : variable Config

    [javac] location: class com.l2jserver.gameserver.network.clientpackets.RequestRestartPoint.DeathTask

    [javac] loc = new Location(Config.FACTION_TEAM1_BASE_X, Config.FACTION_TEAM1_BASE_Y, Config.FACTION_TEAM1_BASE_Z);

    [javac]                   ^

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\network\clientpackets\RequestRestartPoint.java:183: cannot find symbol

    [javac] symbol  : variable Config

    [javac] location: class com.l2jserver.gameserver.network.clientpackets.RequestRestartPoint.DeathTask

    [javac] loc = new Location(Config.FACTION_TEAM1_BASE_X, Config.FACTION_TEAM1_BASE_Y, Config.FACTION_TEAM1_BASE_Z);

    [javac]                                                 ^

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\network\clientpackets\RequestRestartPoint.java:183: cannot find symbol

    [javac] symbol  : variable Config

    [javac] location: class com.l2jserver.gameserver.network.clientpackets.RequestRestartPoint.DeathTask

    [javac] loc = new Location(Config.FACTION_TEAM1_BASE_X, Config.FACTION_TEAM1_BASE_Y, Config.FACTION_TEAM1_BASE_Z);

    [javac]                                                                             ^

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\network\clientpackets\RequestRestartPoint.java:187: cannot find symbol

    [javac] symbol  : variable Config

    [javac] location: class com.l2jserver.gameserver.network.clientpackets.RequestRestartPoint.DeathTask

    [javac] loc = new Location(Config.FACTION_TEAM2_BASE_X, Config.FACTION_TEAM2_BASE_Y, Config.FACTION_TEAM2_BASE_Z);

    [javac]                   ^

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\network\clientpackets\RequestRestartPoint.java:187: cannot find symbol

    [javac] symbol  : variable Config

    [javac] location: class com.l2jserver.gameserver.network.clientpackets.RequestRestartPoint.DeathTask

    [javac] loc = new Location(Config.FACTION_TEAM2_BASE_X, Config.FACTION_TEAM2_BASE_Y, Config.FACTION_TEAM2_BASE_Z);

    [javac]                                                 ^

    [javac] C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\network\clientpackets\RequestRestartPoint.java:187: cannot find symbol

    [javac] symbol  : variable Config

    [javac] location: class com.l2jserver.gameserver.network.clientpackets.RequestRestartPoint.DeathTask

    [javac] loc = new Location(Config.FACTION_TEAM2_BASE_X, Config.FACTION_TEAM2_BASE_Y, Config.FACTION_TEAM2_BASE_Z);

    [javac]                                                                             ^

    [javac] Note: C:\Users\elias\workspace\L2_GameServer 2.4\java\com\l2jserver\gameserver\model\L2World.java uses or overrides a deprecated API.

    [javac] Note: Recompile with -Xlint:deprecation for details.

    [javac] 11 errors

 

BUILD FAILED

C:\Users\elias\workspace\L2_GameServer 2.4\build.xml:62: Compile failed; see the compiler error output for details.

 

Total time: 14 seconds

Recommended Posts

  • 0
Posted

Καταρχάς, το eclipse πρέπει να έχει μαρκάρει τις γραμμές με τα error, με μία κόκκινη "ζικ ζακ" γραμμή.

Βρες τα αρχεία που έχουν αυτά τα errors και δείξε μας φωτογραφίες.

  • 0
Posted

ta Arxia ine ta Eksis

Me ena Kokino X

 

L2FolkInstance.java

RequestJoinParty.java

RequestRestartPoint.java

Μα πως τα άφησες έτσι;

Δεν κοιτάς κανένα guide;...

Ζητάτε βοήθεια σε ανόητα πράγματα... -.-

  • 0
Posted

Μα πως τα άφησες έτσι;

Δεν κοιτάς κανένα guide;...

Ζητάτε βοήθεια σε ανόητα πράγματα... -.-

 

ti enois pos ta afisa etc?

  • 0
Posted

Ωραία, θα τα λύσουμε όλα βήμα βήμα.

Καταρχάς, άνοιξε τα αρχεία με όνομα

RequestJoinParty.java

RequestRestartPoint.java

πήγαινε στις κόκκινες γραμμές, τράβα φωτογραφίες με τα errors και δείξε τα μας εδώ.

  • 0
Posted

/*
* 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.l2jserver.gameserver.model.actor.instance;

import java.util.logging.Logger;

import javolution.text.TextBuilder;
import com.l2jserver.Config;
import com.l2jserver.gameserver.datatables.SkillTable;
import com.l2jserver.gameserver.datatables.SkillTreeTable;
import com.l2jserver.gameserver.model.L2Skill;
import com.l2jserver.gameserver.model.L2SkillLearn;
import com.l2jserver.gameserver.model.base.ClassId;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
import com.l2jserver.gameserver.network.serverpackets.AcquireSkillList;
import com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillList;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;

public class L2FolkInstance extends L2NpcInstance
{
   protected static Logger _log = Logger.getLogger(L2FolkInstance.class.getName());
   private final ClassId[] _classesToTeach;

   public L2FolkInstance(int objectId, L2NpcTemplate template)
   {
       super(objectId, template);
       _classesToTeach = template.getTeachInfo();
   }

   @Override
   public void onAction(L2PcInstance player)
   {
       player.setLastFolkNPC(this);
       super.onAction(player);
   }

   /**
    *
    * @param player
    */
   public void showSkillList(L2PcInstance player, ClassId classId)
   {
       if (Config.DEBUG)
           _log.fine("SkillList activated on: " + getObjectId());
       int npcId = getTemplate().npcId;
       if (_classesToTeach == null)
       {
           NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
           TextBuilder sb = new TextBuilder();
           sb.append("<html><body>");
           sb.append("I cannot teach you. My class list is empty.<br> Ask admin to fix it. Need add my npcid and classes to skill_learn.sql.<br>NpcId:" + npcId + ", Your classId:" + player.getClassId().getId() + "<br>");
           sb.append("</body></html>");
           html.setHtml(sb.toString());
           player.sendPacket(html);
           return;
       }
       if (!getTemplate().canTeach(classId))
       {
           NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
           TextBuilder sb = new TextBuilder();
           sb.append("<html><body>");
           sb.append("I cannot teach you any skills.<br> You must find your current class teachers.");
           sb.append("</body></html>");
           html.setHtml(sb.toString());
           player.sendPacket(html);
           return;
       }
       L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableSkills(player, classId);
       AcquireSkillList asl = new AcquireSkillList(AcquireSkillList.SkillType.Usual);
       int counts = 0;
       for (L2SkillLearn s : skills)
       {
           L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
           if (sk == null || !sk.getCanLearn(player.getClassId()) || !sk.canTeachBy(npcId))
               continue;
           int cost = SkillTreeTable.getInstance().getSkillCost(player, sk);
           counts++;
           asl.addSkill(s.getId(), s.getLevel(), s.getLevel(), cost, 0);
       }
       if (counts == 0)
       {
           int minlevel = SkillTreeTable.getInstance().getMinLevelForNewSkill(player, classId);
           if (minlevel > 0)
           {
               SystemMessage sm = new SystemMessage(SystemMessageId.DO_NOT_HAVE_FURTHER_SKILLS_TO_LEARN);
               sm.addNumber(minlevel);
               player.sendPacket(sm);
           }
           else
           {
               SystemMessage sm = new SystemMessage(SystemMessageId.NO_MORE_SKILLS_TO_LEARN);
               player.sendPacket(sm);
           }
       }
       else
       {
           player.sendPacket(asl);
       }
       player.sendPacket(ActionFailed.STATIC_PACKET);
   }

   /**
    * this displays EnchantSkillList to the player.
    *
    * @param player
    */
   public void showEnchantSkillList(L2PcInstance player, ClassId classId)
   {
       if (Config.DEBUG)
           _log.fine("EnchantSkillList activated on: " + getObjectId());
       int npcId = getTemplate().npcId;
       if (_classesToTeach == null)
       {
           NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
           TextBuilder sb = new TextBuilder();
           sb.append("<html><body>");
           sb.append("I cannot teach you. My class list is empty.<br> Ask admin to fix it. Need add my npcid and classes to skill_learn.sql.<br>NpcId:" + npcId + ", Your classId:" + player.getClassId().getId() + "<br>");
           sb.append("</body></html>");
           html.setHtml(sb.toString());
           player.sendPacket(html);
           return;
       }
       if (!getTemplate().canTeach(classId))
       {
           NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
           TextBuilder sb = new TextBuilder();
           sb.append("<html><body>");
           sb.append("I cannot teach you any skills.<br> You must find your current class teachers.");
           sb.append("</body></html>");
           html.setHtml(sb.toString());
           player.sendPacket(html);
           return;
       }
       if (player.getClassId().getId() < 88)
       {
           NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
           TextBuilder sb = new TextBuilder();
           sb.append("<html><body>");
           sb.append("You must have 3rd class change quest completed.");
           sb.append("</body></html>");
           html.setHtml(sb.toString());
           player.sendPacket(html);
           return;
       }
       ExEnchantSkillList esl = new ExEnchantSkillList(null);
       int counts = 0;
       if (counts == 0)
       {
           player.sendPacket(new SystemMessage(SystemMessageId.THERE_IS_NO_SKILL_THAT_ENABLES_ENCHANT));
           NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
           int level = player.getLevel();
           if (level < 74)
           {
               SystemMessage sm = new SystemMessage(SystemMessageId.DO_NOT_HAVE_FURTHER_SKILLS_TO_LEARN);
               sm.addNumber(level);
               player.sendPacket(sm);
           }
           else
           {
               TextBuilder sb = new TextBuilder();
               sb.append("<html><body>");
               sb.append("You've learned all skills for your class.<br>");
               sb.append("</body></html>");
               html.setHtml(sb.toString());
               player.sendPacket(html);
           }
       }
       else
       {
           player.sendPacket(esl);
       }
       player.sendPacket(ActionFailed.STATIC_PACKET);
   }

   @Override
   public void onBypassFeedback(L2PcInstance player, String command)
   {
       if (command.startsWith("SkillList"))
       {
           if (Config.ALT_GAME_SKILL_LEARN)
           {
               String id = command.substring(9).trim();
               if (id.length() != 0)
               {
                   player.setSkillLearningClassId(ClassId.values()[integer.parseInt(id)]);
                   showSkillList(player, ClassId.values()[integer.parseInt(id)]);
               }
               else
               {
                   boolean own_class = false;
                   if (_classesToTeach != null)
                   {
                       for (ClassId cid : _classesToTeach)
                       {
                           if (cid.equalsOrChildOf(player.getClassId()))
                           {
                               own_class = true;
                               break;
                           }
                       }
                   }
                   String text = "<html><body><center>Skill learning:</center><br>";
                   if (!own_class)
                   {
                       String mages = player.getClassId().isMage() ? "fighters" : "mages";
                       text += "Skills of your class are the easiest to learn.<br>" + "Skills of another class are harder.<br>" + "Skills for another race are even more hard to learn.<br>" + "You can also learn skills of " + mages + ", and they are" + " the hardest to learn!<br>" + "<br>";
                   }
                   // make a list of classes
                   if (_classesToTeach != null)
                   {
                       int count = 0;
                       ClassId classCheck = player.getClassId();
                       while (count == 0 && classCheck != null)
                       {
                           for (ClassId cid : _classesToTeach)
                           {
                               if (cid.level() != classCheck.level())
                                   continue;
                               if (SkillTreeTable.getInstance().getAvailableSkills(player, cid).length == 0)
                                   continue;
                               text += "<a action=\"bypass -h npc_%objectId%_SkillList " + cid.getId() + "\">Learn " + cid + "'s class Skills</a><br>\n";
                               count++;
                           }
                           classCheck = classCheck.getParent();
                       }
                       classCheck = null;
                   }
                   else
                   {
                       text += "No Skills.<br>";
                   }
                   text += "</body></html>";
                   insertObjectIdAndShowChatWindow(player, text);
                   player.sendPacket(ActionFailed.STATIC_PACKET);
               }
           }
           else
           {
               player.setSkillLearningClassId(player.getClassId());
               showSkillList(player, player.getClassId());
           }
       }
       else if (command.startsWith("EnchantSkillList"))
       {
           showEnchantSkillList(player, player.getClassId());
       }
       else
       {
           super.onBypassFeedback(player, command);
       }
   }
}

 

Όπως είναι βάλτο.

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...