Jump to content
  • 0

[Help]Instance warning


Question

Posted

Hi all i hope make this right in the right forum.

 

i have a problem or a warning extrage when i put anty cheat warehouse.

 

here a picture is more expresive :P

 

eb8y9k.jpg

 

i go to apreciate any help ^^ tnx a lot.

9 answers to this question

Recommended Posts

  • 0
Posted

You dont really need to worry about warnings..

 

By the way, I think its shows that warning because target already is a instance of L2WarehouseInstance.

 

Look at the line above the warning:

L2WarehouseInstance target = null;

  • 0
Posted

@Fanky

Here a null check has nothing to do... in the code is specified to be null in the upper line...

L2WarehouseInstance target = null;
if (player.getActiveEnchantItem != null && target instanceof L2WarehouseInstance)
{

 

@author

Just remove it, it has not sense, it must be instanceof L2WarehouseInstance, it doesn't need to be checked.

 

L2WarehouseInstance target = null;
if (player.getActiveEnchantItem != null)
{

  • 0
Posted

@Fanky

Here a null check has nothing to do... in the code is specified to be null in the upper line...

L2WarehouseInstance target = null;
if (player.getActiveEnchantItem != null && target instanceof L2WarehouseInstance)
{

 

@author

Just remove it, it has not sense, it must be instanceof L2WarehouseInstance, it doesn't need to be checked.

 

L2WarehouseInstance target = null;
if (player.getActiveEnchantItem != null)
{

hm,seems I misunderstood it
  • 0
Posted

@Fanky

Here a null check has nothing to do... in the code is specified to be null in the upper line...

L2WarehouseInstance target = null;
if (player.getActiveEnchantItem != null && target instanceof L2WarehouseInstance)
{

 

@author

Just remove it, it has not sense, it must be instanceof L2WarehouseInstance, it doesn't need to be checked.

 

L2WarehouseInstance target = null;
if (player.getActiveEnchantItem != null)
{

 

Or maybe that part of code is wrong, try it:

 

-L2WarehouseInstance target = null;
+L2Object target = player.getTarget();

 

Sorry for double post.

 

  • 0
Posted

Simply reading the screen, it misses something.

 

A correct check would be eventually

L2Object target = player.getTarget();

And then your target check about "if object instanceof blabla" would be ok. Actually target is always null.

 

But it depends entirely of complete method. Perhaps such check on target has already been made higher in the code, and so it's pointless to remake one.

  • 0
Posted

tnx for answer the post, cant fix them so i add @SuppressWarnings("cast") maeby in other java i have something missing.

(facepalm)

Guest
This topic is now closed to further replies.


  • Posts

    • https://gitlab.com/Tryskell/acis_public nai swsta, exeis kati pio updated na mas protineis? 
    • 🔥 L2Gold Enma – High Rate PvP Interlude 🔥 Interlude Chronicle • C6 Skills • Pure PvP Experience Welcome to L2Gold Enma, a high-rate PvP server designed for players who want instant action, balanced gameplay and nonstop PvP, without pointless grinding. ⚔️ Server Rates XP / SP: x1000 Adena / Drops: x10 Chronicle: Interlude Skills: C6 balanced skills Buff duration: 2 hours No weight limit 🎮 Gameplay Philosophy Fast leveling, instant PvP Clean Interlude experience No pay-to-win mechanics Focus on skill-based PvP 🛡️ Core Features Global Gatekeeper Offline shops Auto events (TvT, DM, CTF, etc.) Retail-like Olympiad with custom balance Active Raid Bosses Easy access to PvP gear 🏰 PvP & Competition Mass PvP & clan wars Meaningful castle sieges Olympiad focused on player skill Balanced classes for both solo & group PvP ⚡ Why L2Gold Enma? Interlude nostalgia with C6 skills High rates, low grind Stable server & active development Community-focused updates 💥 Join L2Gold Enma and dominate the battlefield! This is not a farm server. This is PvP   https://l2gold-enma.com/ https://discord.com/invite/Ba9cHj3HUJ
    • Hi I'm still online for this but making backup of everything in that time I didn't organize well so let me create a pack and upload to archive.org maybe. Thanks ! we can enrich togethers this if everyone add more and more old files.
    • 🔥 **Rework Multi-Sub x12 is coming!** 🔥 A brand-new Lineage II server built from scratch with modern systems, balance, and long-term gameplay in mind. 🧪 OBT: **Feb 16, 18:00 MSK** 🚀 Grand Opening: **Feb 20, 20:00 MSK** Season Pass • Homunculi • Global Trade • Guaranteed Synthesis Clean mechanics. Real progression. Fresh start. 🔗 Join the new chapter of Rework. https://rework.multeria.world/
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..