problem reading the BD on a script

Find the proper support area, Saga-Version.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
galrunch
Posts: 37
Joined: Thu Feb 10, 2011 7:42 pm

problem reading the BD on a script

Post by galrunch »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: 4912
L2JDP Revision Number: 8360

hii people, i have one problem with one class on my server because i try to put one all buff button for chs but i want that this button only give buffs to chs that i have in one table on DB. when the class/script (com/l2jserver/gameserver/model/actor/instance/L2ClanHallManagerInstance.class) try to read the table send me an error in the log. The error is:

Code: Select all

Table buff_npc_ch not found : Update your DataPack! Error : Before start of result set java.sql.SQLException: Before start of result set     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)     at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:841)     at com.mysql.jdbc.ResultSetImpl.getInt(ResultSetImpl.java:2674)     at com.mysql.jdbc.ResultSetImpl.getInt(ResultSetImpl.java:2815)     at com.mchange.v2.c3p0.impl.NewProxyResultSet.getInt(NewProxyResultSet.java:2573)     at com.l2jserver.gameserver.model.actor.instance.L2ClanHallManagerInstance.onBypassFeedback(L2ClanHallManagerInstance.java:1357)     at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:144)     at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:62)     at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1000)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)     at java.lang.Thread.run(Thread.java:722)
the part of the script that i have the conexion to the table is:

Code: Select all

                else if (actualCommand.equalsIgnoreCase("allbuffs"))                    {                                            Connection con = null;                                            try                                            {                                                    con = L2DatabaseFactory.getInstance().getConnection();                                                    PreparedStatement statement = con.prepareStatement("SELECT * FROM buff_npc_ch");                                                    ResultSet helperbuffdata = statement.executeQuery();                                                         if (getClanHall().getId() == helperbuffdata.getInt("id_clanhall") )                                                    {                                                        if (player.isCursedWeaponEquipped())                                                        {                                                                // Custom system message                                                                player.sendMessage("The wielder of a cursed weapon cannot receive outside heals or buffs");                                                                return;                                                        }                                                        else                                                        {                                                        int chlvl = getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLvl();                                                        // buff for lvl 1-8                                                        if (chlvl <= 8)                                                        {                                                                        L2Skill WdWk = SkillTable.getInstance().getInfo(4342, 2);                                                                        if (WdWk != null)                                                                        {                                                                                setTarget(player);                                                                                doCast(WdWk);                                                                        }                                                                        L2Skill DcrWht = SkillTable.getInstance().getInfo(4343, 3);                                                                        if (DcrWht != null)                                                                        {                                                                                setTarget(player);                                                                                doCast(DcrWht);                                                                        }                                                                        L2Skill Shld = SkillTable.getInstance().getInfo(4344, 3);                                                                        if (Shld != null)                                                                        {                                                                                 setTarget(player);                                                                                 doCast(Shld);                                                                        }                                                                        L2Skill MtlShld = SkillTable.getInstance().getInfo(4346, 4);                                                                        if (MtlShld != null)                                                                        {                                                                                setTarget(player);                                                                                doCast(MtlShld);                                                                        }                                                                        L2Skill Mht = SkillTable.getInstance().getInfo(4345, 3);                                                                        if (Mht != null)                                                                        {                                                                                setTarget(player);                                                                                doCast(Mht);                                                                        }                                                                        // buffs for lvl 7-8                                                                        if (chlvl >= 7)                                                                        {                                                                                L2Skill BlsBdy = SkillTable.getInstance().getInfo(4347, 6);                                                                                if (BlsBdy != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(BlsBdy);                                                                                }                                                                                L2Skill MgcBrr = SkillTable.getInstance().getInfo(4349, 2);                                                                                if (MgcBrr != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(MgcBrr);                                                                                }                                                                                L2Skill RstSck = SkillTable.getInstance().getInfo(4350, 4);                                                                                if (RstSck != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(RstSck);                                                                                }                                                                                L2Skill BlsSl = SkillTable.getInstance().getInfo(4348, 6);                                                                                if (BlsSl != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(BlsSl);                                                                                }                                                                                L2Skill Ctn = SkillTable.getInstance().getInfo(4351, 6);                                                                                if (Ctn != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(Ctn);                                                                                }                                                                                L2Skill BskSpt = SkillTable.getInstance().getInfo(4352, 2);                                                                                if (BskSpt != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(BskSpt);                                                                                }                                                                                L2Skill BlsShld = SkillTable.getInstance().getInfo(4353, 6);                                                                                if (BlsShld != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(BlsShld);                                                                                }                                                                                L2Skill Gde = SkillTable.getInstance().getInfo(4358, 3);                                                                                if (Gde != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(Gde);                                                                                }                                                                                L2Skill VpcRg = SkillTable.getInstance().getInfo(4354, 4);                                                                                if (VpcRg != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(VpcRg);                                                                                }                                                                                // buffs for lvl 8                                                                                if (chlvl == 8)                                                                                {                                                                                L2Skill Acm = SkillTable.getInstance().getInfo(4355, 1);                                                                                if (Acm != null)                                                                                        {                                                                                                setTarget(player);                                                                                                doCast(Acm);                                                                                        }                                                                                        L2Skill Epwr = SkillTable.getInstance().getInfo(4356, 1);                                                                                        if (Epwr != null)                                                                                        {                                                                                                setTarget(player);                                                                                                doCast(Epwr);                                                                                        }                                                                                        L2Skill Hst = SkillTable.getInstance().getInfo(4357, 1);                                                                                        if (Hst != null)                                                                                        {                                                                                                setTarget(player);                                                                                                doCast(Hst);                                                                                        }                                                                                        L2Skill Fcs = SkillTable.getInstance().getInfo(4359, 1);                                                                                        if (Fcs != null)                                                                                        {                                                                                                setTarget(player);                                                                                                doCast(Fcs);                                                                                        }                                                                                        L2Skill DthWpr = SkillTable.getInstance().getInfo(4360, 1);                                                                                        if (DthWpr != null)                                                                                        {                                                                                                setTarget(player);                                                                                                doCast(DthWpr);                                                                                        }                                                                                }                                                                        }                                                                        // buffs for lvl 4-6                                                                        else if (chlvl >= 4)                                                                        {                                                                                L2Skill BlsBdy = SkillTable.getInstance().getInfo(4347, 2);                                                                                if (BlsBdy != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(BlsBdy);                                                                                }                                                                                L2Skill MgcBrr = SkillTable.getInstance().getInfo(4349, 1);                                                                                if (MgcBrr != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(MgcBrr);                                                                                }                                                                                L2Skill RstSck = SkillTable.getInstance().getInfo(4350, 1);                                                                                if (RstSck != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(RstSck);                                                                                }                                                                                L2Skill BlsSl = SkillTable.getInstance().getInfo(4348, 2);                                                                                if (BlsSl != null)                                                                                {                                                                                        setTarget(player);                                                                                        doCast(BlsSl);                                                                                }                                                                                // buffs for lvl 5-6                                                                                if (chlvl >= 5)                                                                                {                                                                                        L2Skill Ctn = SkillTable.getInstance().getInfo(4351, 2);                                                                                        if (Ctn != null)                                                                                        {                                                                                                setTarget(player);                                                                                                doCast(Ctn);                                                                                        }                                                                                        L2Skill BskSpt = SkillTable.getInstance().getInfo(4352, 1);                                                                                        if (BskSpt != null)                                                                                        {                                                                                                setTarget(player);                                                                                                doCast(BskSpt);                                                                                        }                                                                                        L2Skill BlsShld = SkillTable.getInstance().getInfo(4353, 2);                                                                                        if (BlsShld != null)                                                                                        {                                                                                                setTarget(player);                                                                                                doCast(BlsShld);                                                                                        }                                                                                        L2Skill Gde = SkillTable.getInstance().getInfo(4358, 1);                                                                                        if (Gde != null)                                                                                        {                                                                                                setTarget(player);                                                                                                doCast(Gde);                                                                                        }                                                                                        L2Skill VpcRg = SkillTable.getInstance().getInfo(4354, 1);                                                                                        if (VpcRg != null)                                                                                        {                                                                                                setTarget(player);                                                                                                doCast(VpcRg);                                                                                        }                                                                                        // buffs for lvl 6                                                                                        if (chlvl == 6)                                                                                        {                                                                                                L2Skill Acm = SkillTable.getInstance().getInfo(4355, 1);                                                                                                if (Acm != null)                                                                                                {                                                                                                        setTarget(player);                                                                                                        doCast(Acm);                                                                                                }                                                                                                L2Skill Epwr = SkillTable.getInstance().getInfo(4356, 1);                                                                                                if (Epwr != null)                                                                                                {                                                                                                        setTarget(player);                                                                                                        doCast(Epwr);                                                                                                }                                                                                                L2Skill Hst = SkillTable.getInstance().getInfo(4357, 1);                                                                                                if (Hst != null)                                                                                                {                                                                                                        setTarget(player);                                                                                                        doCast(Hst);                                                                                                }                                                                                                L2Skill Fcs = SkillTable.getInstance().getInfo(4359, 1);                                                                                                if (Fcs != null)                                                                                                {                                                                                                        setTarget(player);                                                                                                        doCast(Fcs);                                                                                                }                                                                                                L2Skill DthWpr = SkillTable.getInstance().getInfo(4360, 1);                                                                                                if (DthWpr != null)                                                                                                {                                                                                                        setTarget(player);                                                                                                        doCast(DthWpr);                                                                                                }                                                                                        }                                                                                }                                                                        }                                                                }                                                        }                                                           return;                                                }                                                else                                                {                                                    NpcHtmlMessage html = new NpcHtmlMessage(1);                                                    html.setFile(player.getHtmlPrefix(), "data/html/clanHallManager/donacion.htm");                                                }                                                         //fillHelperBuffTable(helperbuffdata);                                                    helperbuffdata.close();                                                    statement.close();                                            }                                            catch (Exception e)                                            {                                                    _log.log(Level.SEVERE, "Table helper_buff_list not found : Update your DataPack! Error : " + e.getMessage(), e);                                            }                                            finally                                            {                                                    L2DatabaseFactory.close(con);                                            }
sorry for my bad english
galrunch
Posts: 37
Joined: Thu Feb 10, 2011 7:42 pm

Re: problem reading the BD on a script

Post by galrunch »

anyone can help me plz?¿
galrunch
Posts: 37
Joined: Thu Feb 10, 2011 7:42 pm

Re: problem reading the BD on a script

Post by galrunch »

please help me :S
User avatar
wenthian
Posts: 30
Joined: Wed Aug 04, 2010 3:39 am
Location: Indonesia
Contact:

Re: problem reading the BD on a script

Post by wenthian »

check your buff table...
***** " I 'm the chosen not an option"
Image
galrunch
Posts: 37
Joined: Thu Feb 10, 2011 7:42 pm

Re: problem reading the BD on a script

Post by galrunch »

the buff table runs well because all buffs of ch works but the thing that not work is the button that buff me with all buffs from ch. I think that the problem can be that the table of DB need to be installed with database instale.sh. This can be the problem?

sorry for my eng
Post Reply