Jump to content
  • 0

offline buffer problem on load


Question

Posted (edited)

Hello folks , well im getting into the point: im facing a problem with offline buffers.
I can set them as offline buffers and work ,but they aren't restoring after restart ,also give a error at system .

 

pics: https://imgur.com/a/unUqNOA

+

 

Spoiler

    private void saveSellerData(L2PcInstance seller){
        Connection con = null;    
        try
        {
            con = L2DatabaseFactory.getInstance().getConnection(false);
            PreparedStatement statement;
            statement = con.prepareStatement("CALL sellbuff_saveSellerData(?,?,?,?)");
            statement.setInt(1, seller.getObjectId());
            statement.setString(2, seller.getTitle());
            statement.setInt(3, seller.getAppearance().getTitleColor());
            statement.setInt(4, seller.getAppearance().getNameColor());
            statement.execute();
            statement.close();
            statement = null;
        }
        catch(Exception e)
        {
            if(Config.ENABLE_ALL_EXCEPTIONS)
                e.printStackTrace();
        }
        finally
        {
            CloseUtil.close(con);
            con = null;
        }
    }
    
    public void restoreSellerData(L2PcInstance seller){
        //int defaultNickColor = 16777215; // white
        //int defaultTitleColor = 16777079; // light blue
        
        Connection con = null;    
        try
        {
            con = L2DatabaseFactory.getInstance().getConnection(false);
            PreparedStatement statement;
            statement = con.prepareStatement("CALL sellbuff_restoreSellerData(?)");
            statement.setInt(1, seller.getObjectId());
            
            ResultSet res = statement.executeQuery();

            while(res.next())
            {
                seller.setTitle(res.getString("lastTitle"));
                seller.getAppearance().setTitleColor(Integer.parseInt(res.getString("lastTitleColor")));
                seller.getAppearance().setNameColor(Integer.parseInt(res.getString("lastNameColor")));
            }
            res.close();
            res = null;
            statement.close();
            statement = null;
        }
        catch(Exception e)
        {
            if(Config.ENABLE_ALL_EXCEPTIONS)
                e.printStackTrace();
        }
        finally
        {
            CloseUtil.close(con);
            con = null;
        }
    }

i can't fine the mistake :/ .. 

thanks.

3.PNG

Edited by Irrelevant

7 answers to this question

Recommended Posts

  • 0
Posted (edited)

In its error it says that parameter 5 has not been specified and that is true because you are only sending 4


Well, according to the code that you have shown, you are calling a store procedure that recive apparently 5 parameters and you are only sending 4 and that is why it is possibly giving you the error in the console

Edited by TGSLineage2
  • Thanks 1
  • 0
Posted

To save or update you can create a button that calls a save method in the database, and to automatically save after a reboot or shutdown, you must go to the shutdown class and call the save method of the buff, that will be the same used for the buttom, for the error in console, check the number of parameters of your stored procedure that you are calling.

  • 0
Posted
12 minutes ago, TGSLineage2 said:

To save or update you can create a button that calls a save method in the database, and to automatically save after a reboot or shutdown, you must go to the shutdown class and call the save method of the buff, that will be the same used for the buttom, for the error in console, check the number of parameters of your stored procedure that you are calling.

already did that

Spoiler

Index: gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java
===================================================================

        try
         {
-            if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS)
+             if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE || Config.OFFLINE_SELLBUFF_ENABLED) && Config.RESTORE_OFFLINERS)
                 OfflineTradeTable.storeOffliners();
         }

 

  • 0
Posted (edited)

check the number of parameters of this SP sellbuff_saveSellerData
What does this method do?
OfflineTradeTable.storeOffliners ();
Are you sure it works smoothly?
check that if it is running with an alert in the console

Edited by TGSLineage2
  • 0
Posted
2 minutes ago, TGSLineage2 said:

check number of parameters of this SP sellbuff_saveSellerData 
what does this method do?
OfflineTradeTable.storeOffliners();
Are you sure it's running whitout problems?

its l2jfrozen . it use that for offline table in navicat

  • 0
Posted
6 minutes ago, TGSLineage2 said:

In its error it says that parameter 5 has not been specified and that is true because you are only sending 4

OMG you are right ..i am blind !! omg dude ..thanks.. fixed !! pff sorry!!

Guest
This topic is now closed to further replies.
  • Posts

    • Hi everyone,   In 2014, I completely stepped away from developing L2 servers and doing L2J-related work. Since then, I’ve only opened this server about once a year and helped a few servers and individuals for free. I haven’t taken on any paid L2J work since then.   LINEAGE2.GOLD is a project that has reached about Season 6. The first season launched at the end of 2020 and was a fully rebuilt Gold-style server on the Classic client (protocol 110). It featured many custom systems and enhancements. After several seasons, I decided to abandon the Mobius-based project and move to Lucera, as my goal was to get as close as possible to Interlude PTS behavior while still staying on the L2J platform.   The current project was once again completely rebuilt, this time on the Essence client (protocol 306), and is based on Lucera. Because of that, acquiring a license from Deazer is required.   My Lucera extender includes, but is not limited to: Formulas.java Basic anti-bot detection, which proved quite effective, we caught most Adrenaline users using relatively simple server-side logic, logged them, and took staff action. Simple admin account lookup commands based on IP, HWID, and similar identifiers. In-game Captcha via https://lineage2.gold/code, protected by Cloudflare, including admin commands for blacklisting based on aggression levels and whitelisting. Additional admin tools such as Auto-Play status checks, Enchanted Hero Weapon live sync, force add/remove clans from castle sieges, item listeners for live item monitoring, and more. A fully rewritten Auto-Play system with support for ExAutoPlaySetting, while still using the Auto-Play UI wheel, featuring: Debuff Efficiency Party Leader Assist Respectful Hunting Healer AI Target Mode Range Mode Summoner buff support Dwarf mechanics Reworked EffectDispelEffects to restore buffs after Cancellation. Raid Bomb item support. Reworked CronZoneSwitcher. Prime Time Raid Respawn Service. Community Board features such as Top rankings and RB/Epic status. Custom systems for Noblesse, Subclasses, support-class rewards, and much more.   Depending on the deal, the project can include: The lineage2.gold domain The website built on the Laravel PHP framework The server’s Discord Client Interface source Server files and extender source The server database (excluding private data such as emails and passwords)   I’m primarily looking for a serious team to continue the project, as it would be a shame to see this work abandoned. This is not cheap. You can DM me with offers. If you’re wondering why I’m doing this: I’ve felt a clear lack of appreciation from the L2 community, and I’m not interested in doing charity work for people who don’t deserve it. I’m simply not someone who tolerates BS. Server Info: https://lineage2.gold/info Server for test: https://lineage2.gold/download Over 110 videos YouTube playlist: https://www.youtube.com/watch?v=HO7BZaxUv2U&list=PLD9WZ0Nj-zstZaYeWxAxTKbX7ia2M_DUu&index=113
    • ACTUALIZATION > SAMURAI CROW PRICE. 500$ (P542) 300$ (P520) 200$ (P509)  
  • 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..

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