Jump to content
  • 0

Problem with Java code


Question

Posted

+     

+        setIsParalyzed(false);

+        stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);

+        sendMessage("You are unparalized.");

 

i have an error ABNORMAL_EFFECT_HOLD_1);cannot be resolved or is not at field

14 answers to this question

Recommended Posts

  • 0
Posted

If the line:

import com.l2jserver.gameserver.model.effects.AbnormalEffect;

is missing you will get an error, "adding the missing import" means copy/paste that line into import definition area, between pakage declaration and class declaration.

 

If it's already there you won't get an error and you may ignore the comment.

  • 0
Posted

pakage declaration and class declaration. where exactly ?

 

Description Resource Path Location Type

ABNORMAL_EFFECT_HOLD_1 cannot be resolved or is not a field L2PcInstance.java /L2J_Server/java/com/l2jserver/gameserver/model/actor/instance line 10619 Java Problem

Description Resource Path Location Type

ABNORMAL_EFFECT_HOLD_1 cannot be resolved or is not a field L2PcInstance.java /L2J_Server/java/com/l2jserver/gameserver/model/actor/instance line 10690 Java Problem

 

 

 

if (getSubClasses().containsKey(classIndex))
			return false;
		    	
		    	startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);  <<ERROR>>
		    	setIsParalyzed(true);
		    	sendMessage("You are paralized untill your subclass load.");

 

if (Config.DEBUG)
			_log.info(getName() + " was given " + getAllSkills().length + " skills for their new sub class.");
		        
		        setIsParalyzed(false);
		        stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1); <<ERROR>>
		        sendMessage("You are unparalized.");			
		return true;

  • 0
Posted

If the line:

import com.l2jserver.gameserver.model.effects.AbnormalEffect;

is missing you will get an error, "adding the missing import" means copy/paste that line into import definition area, between pakage declaration and class declaration.

 

If it's already there you won't get an error and you may ignore the comment.

where i must put the imports wich line ?
  • 0
Posted

its the same in all programming.U define imports or libraries at the start of a code.such us  #include <stdio.h> which stands for C or #include <iostream.h> for C++.Java u just import the "libraries"so you dont have to write the whole code again and again.Its like calling a code from somewhere as u do with desktop shortcuts.Example:

 

import net.sf.l2j.gameserver.instancemanager.RaidBossPointsManager;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.L2Summon;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.serverpackets.Earthquake;
import net.sf.l2j.gameserver.network.serverpackets.ExRedSky;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.templates.chars.L2NpcTemplate;
import net.sf.l2j.gameserver.util.Broadcast;
import net.sf.l2j.util.Rnd;


         // RedSky and Earthquake and Announcement
         ExRedSky packet = new ExRedSky(10);
         Earthquake eq = new Earthquake(player.getX(), player.getY(), player.getZ(), 14, 3);
         Broadcast.toAllOnlinePlayers(packet);
         Broadcast.toAllOnlinePlayers(eq);
         Broadcast.announceToOnlinePlayers(super.getName()+ " has been killed.");

This code doesnt work but just to give u to understand where the imports are.Always look at the start of every java.If u dont see the imports press the + which is included in a circle button to actualy access more code which is compressed inside that "+".If u still got problem getting the imports tell me what i said wrong

  • 0
Posted
import net.sf.l2j.gameserver.instancemanager.RaidBossPointsManager;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.L2Summon;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.serverpackets.Earthquake;
import net.sf.l2j.gameserver.network.serverpackets.ExRedSky;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.templates.chars.L2NpcTemplate;
import net.sf.l2j.gameserver.util.Broadcast;
import net.sf.l2j.util.Rnd;

If i understood correctly i must put here the imports right? if missing

  • 0
Posted

Yeah u have insert at that point any import that may miss from the code u have.What i gave up was a total random code.If u want me me the code so i can understand better.

  • 0
Posted

Show as the full code pls, its not imports problem, tell us witch file it is. And what you want to make

  • 0
Posted

ctrl+shift+O to correct imports...

 

Btw verify where are stored effects (you try to read from L2Character...) and if effect named ABNORMAL_EFFECT_HOLD_1 simply exists...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Use our premium virtual numbers for fast and convenient account verification on popular services worldwide. Suitable both for mass verification and for one-time registration — reliable, convenient, and without unnecessary complications. Active links: Virtual numbers service: Go to Other services and products: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to post this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Special offer until 31 December, each server only 100 euros.
    • 🔥 L2NeverPain – Opening this Friday! 🔥 The gates open 12 December 2025 – 20:00 (GMT+2). Prepare your squads, set your macros, and get ready for true StuckSub PvP.   Main +2 Sub. Balanced fights. Fresh start. Be there from the first minute.   🛡️Clan Leaders: You can register your clan on discord clan-register channel   🌐https://l2neverpain.com/ 🌐https://discord.gg/kNP3UXgkmN
    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock