Welcome to the RaGEZONE - MMORPG development forums.

v83 supremems source added ring effect bat error

This is a discussion on v83 supremems source added ring effect bat error within the Help forums, part of the Java Based (Odin) category; PHP Code: java . sql . SQLException :  Parameter index out of range  ( 12  >  number of parameters ,  which is 11 ).           at com . mysql ...

Results 1 to 8 of 8
  1. #1
    Hardcore Member
    Rank
    Member
    Join Date
    Jan 2012
    Location
    Kota Kinabalu
    Posts
    130
    Liked
    6

    v83 supremems source added ring effect bat error

    Click
    PHP Code:
    java.sql.SQLExceptionParameter index out of range (12 number of parameters
    which is 11). 
            
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055
            
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956
            
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926
            
    at com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:
    288

            
    at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:
    272

            
    at com.mysql.jdbc.PreparedStatement.setString(PreparedStatement.java:410 
    8

            
    at client.ItemFactory.saveItems(ItemFactory.java:118
            
    at client.MapleCharacter.saveToDB(MapleCharacter.java:4723
            
    at client.MapleCharacter$14.run(MapleCharacter.java:5588
            
    at server.TimerManager$LoggingSaveRunnable.run(TimerManager.java:140
            
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source
            
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source

            
    at java.util.concurrent.FutureTask.runAndReset(Unknown Source
            
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask
    access$101(Unknown Source
            
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask
    runPeriodic(Unknown Source
            
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask
    run(Unknown Source
            
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source 

            
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source
            
    at java.lang.Thread.run(Unknown Source
    Last edited by xAlan; 21-01-12 at 11:48 AM.
    Nothing're Special :(


  2. #2
    while(true) spam();
    Rank
    Moderator
    Join Date
    Jun 2008
    Location
    The Netherlands
    Posts
    3,647
    Liked
    1885

    Re: v83 supremems source added ring effect bat error

    Check params...
    Quote Originally Posted by mavin0107 View Post
    can anyone tell me how to make pokemon system in lithium work cuz i try to go to a map have pokemon but there are no pokemon in that map
    Quote Originally Posted by MentaL View Post
    ps... if you dont like butterflys then ur a homo.

  3. #3
    Hardcore Member
    Rank
    Member
    Join Date
    Jan 2012
    Location
    Kota Kinabalu
    Posts
    130
    Liked
    6

    Re: v83 supremems source added ring effect bat error

    Can i knw where to check it >?
    Nothing're Special :(


  4. #4
    Member
    Rank
    Member
    Join Date
    Jul 2011
    Posts
    28
    Liked
    0

    Re: v83 supremems source added ring effect bat error

    Maybe can be a error on SQL... but im not sure..

  5. #5
    Hardcore Member
    Rank
    Member
    Join Date
    Jan 2012
    Location
    Kota Kinabalu
    Posts
    130
    Liked
    6

    Re: v83 supremems source added ring effect bat error

    I know but idk where . lol
    Nothing're Special :(


  6. #6
    I am a haxzor
    Rank
    Member +
    Join Date
    Apr 2009
    Location
    /system32/
    Posts
    554
    Liked
    127

    Re: v83 supremems source added ring effect bat error

    The error speaks for itself

    at client.ItemFactory.saveItems(ItemFactory.java:118)
    at client.MapleCharacter.saveToDB(MapleCharacter.java:4723)
    at client.MapleCharacter$14.run(MapleCharacter.java:5588)

    at client.FileName.function(filename.java:line)
    "You got a dream, you gotta protect it. People can't do something themselves, they wanna tell you that you can't do it. You want something? Go get it. Period. ~Will Smith"

  7. #7
    Hardcore Member
    Rank
    Member
    Join Date
    Jan 2012
    Location
    Kota Kinabalu
    Posts
    130
    Liked
    6

    Re: v83 supremems source added ring effect bat error

    Anyone help ? how to fix this probelm ?

    PHP Code:
    java.sql.SQLExceptionParameter index out of range (12 number of parameters,  
    which is 11).  
            
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)  
            
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)  
            
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)  
            
    at com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3  
    288
    )  
            
    at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3  
    272
    )  
            
    at com.mysql.jdbc.PreparedStatement.setString(PreparedStatement.java:410  
    8
    )  
            
    at client.ItemFactory.saveItems(ItemFactory.java:118)  
            
    at client.MapleCharacter.saveToDB(MapleCharacter.java:4723)  
            
    at client.MapleCharacter$14.run(MapleCharacter.java:5588)  
            
    at server.TimerManager$LoggingSaveRunnable.run(TimerManager.java:140)  
            
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)  
            
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)  

            
    at java.util.concurrent.FutureTask.runAndReset(Unknown Source)  
            
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.  
    access$101(Unknown Source)  
            
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.  
    runPeriodic(Unknown Source)  
            
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.  
    run(Unknown Source)  
            
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source  
    )  
            
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
            
    at java.lang.Thread.run(Unknown Source
    MapleCharacter line4723 :
    PHP Code:
    public void saveToDB(boolean update) {
            if ((
    update) && this.trade != null) {
                return;
            }
            
    Connection con DatabaseConnection.getConnection();
            try {
                
    con.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
                
    con.setAutoCommit(false);
                
    PreparedStatement ps;
                if (
    update) {
                    
    ps con.prepareStatement("UPDATE characters SET level = ?, fame = ?, str = ?, dex = ?, luk = ?, `int` = ?, exp = ?, hp = ?, mp = ?, maxhp = ?, maxmp = ?, sp = ?, ap = ?, gm = ?, skincolor = ?, gender = ?, job = ?, hair = ?, face = ?, map = ?, meso = ?, hpMpUsed = ?, spawnpoint = ?, party = ?, buddyCapacity = ?, messengerid = ?, messengerposition = ?, reborns = ?, damagerecord = ?,  fishingexp = ?,  fishinglevel = ?, cookingexp = ?, cookinglevel = ?, pvpkills = ?, pvpdeaths = ?, mountlevel = ?, mountexp = ?, mounttiredness= ?, equipslots = ?, useslots = ?, setupslots = ?, etcslots = ?,  monsterbookcover = ?, watchedcygnusintro = ?, vanquisherStage = ?, dojoPoints = ?, lastDojoStage = ?, finishedDojoTutorial = ?, vanquisherKills = ?, matchcardwins = ?, matchcardlosses = ?, matchcardties = ?, omokwins = ?, omoklosses = ?, omokties = ?, occupation = ?, givenRiceCakes = ?, partyquestitems = ?, receivedMOTB = ? WHERE id = ?");
                } else {
                    
    ps con.prepareStatement("INSERT INTO characters (level, fame, str, dex, luk, `int`, exp, hp, mp, maxhp, maxmp, sp, ap, gm, skincolor, gender, job, hair, face, map, meso, hpMpUsed, spawnpoint, party, buddyCapacity, messengerid, messengerposition, reborns, damagerecord, fishingexp, fishinglevel, cookingexp, cookinglevel, pvpkills, pvpdeaths, mountlevel, mounttiredness, mountexp, equipslots, useslots, setupslots, etcslots, monsterbookcover, watchedcygnusintro, vanquisherStage, dojopoints, lastDojoStage, finishedDojoTutorial, vanquisherKills, matchcardwins, matchcardlosses, matchcardties, omokwins, omoklosses, omokties, occupation, givenRiceCakes, partyquestitems, accountid, name, world) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
                }
                if (
    gmLevel && level 199) {
                    
    ps.setInt(1isCygnus() ? 200 200);
                } else {
                    
    ps.setInt(1level);
                }
                
    ps.setInt(2fame);
                
    ps.setInt(3str);
                
    ps.setInt(4dex);
                
    ps.setInt(5luk);
                
    ps.setInt(6int_);
                
    ps.setInt(7exp.get());
                
    ps.setInt(8hp);
                
    ps.setInt(9mp);
                
    ps.setInt(10maxhp);
                
    ps.setInt(11maxmp);
                
    ps.setInt(12remainingSp);
                
    ps.setInt(13remainingAp);
                
    ps.setInt(14gmLevel);
                
    ps.setInt(15skinColor.getId());
                
    ps.setInt(16gender);
                
    ps.setInt(17job.getId());
                
    ps.setInt(18hair);
                
    ps.setInt(19face);
                if ((
    map == null) && (mapid == -1)) { //ie no data for map (shouldn't happen)
                    
    ps.setInt(200);
                } else if (
    map == null)//ie mapid set at createchar
                
    {
                    
    ps.setInt(20mapid);
                } else if (
    map.getForcedReturnId() != 999999999) {
                    
    ps.setInt(20map.getForcedReturnId());
                } else {
                    
    ps.setInt(20map.getId());
                }
                
    ps.setInt(21meso.get());
                
    ps.setInt(22hpMpApUsed);
                if (
    map == null || map.getId() == 610020000 || map.getId() == 610020001) {
                    
    ps.setInt(230);
                } else {
                    
    MaplePortal closest map.findClosestSpawnpoint(getPosition());
                    if (
    closest != null) {
                        
    ps.setInt(23closest.getId());
                    } else {
                        
    ps.setInt(230);
                    }
                }
                
    ps.setInt(24party != null party.getId() : -1);
                
    ps.setInt(25buddylist.getCapacity());
                if (
    messenger != null) {
                    
    ps.setInt(26messenger.getId());
                    
    ps.setInt(27messengerposition);
                    
    ps.setInt(28reborns);
                } else {
                    
    ps.setInt(260);
                    
    ps.setInt(274);
                    
    ps.setInt(28reborns);
                    
    ps.setInt(29damagerecord);
                
    ps.setInt(30FishingExp);
                
    ps.setInt(31FishingLevel);
               
    ps.setInt(32CookingExp);
                
    ps.setInt(33CookingLevel);
                
    ps.setInt(34pvpkills);
                 
    ps.setInt(35pvpdeaths);

    }
                if (
    maplemount != null) {
                    
    ps.setInt(36maplemount.getLevel());
                    
    ps.setInt(37maplemount.getExp());
                    
    ps.setInt(38maplemount.getTiredness());
                } else {
                    
    ps.setInt(361);
                    
    ps.setInt(370);
                    
    ps.setInt(380);
                }
                for (
    int i 3943i++) {
                    
    ps.setInt(igetInventory(MapleInventoryType.getByType((byte) (37))).getSlotLimit());
                }
                if (
    update) {
                    
    monsterbook.saveCards(getId());
                    try {
                        
    getFamily().save();
                    } catch (
    NullPointerException npe) {
                    }
                }
                
    ps.setInt(43bookCover);
                
    ps.setInt(44watchedCygnusIntro 0);
                
    ps.setInt(45vanquisherStage);
                
    ps.setInt(46dojoPoints);
                
    ps.setInt(47dojoStage);
                
    ps.setInt(48finishedDojoTutorial 0);
                
    ps.setInt(49vanquisherKills);
                
    ps.setInt(50matchcardwins);
                
    ps.setInt(51matchcardlosses);
                
    ps.setInt(52matchcardties);
                
    ps.setInt(53omokwins);
                
    ps.setInt(54omoklosses);
                
    ps.setInt(55omokties);
                
    ps.setInt(56occupation.getId());
                
    ps.setInt(57givenRiceCakes);
                
    ps.setString(58partyquestitems);
                if (
    update) {
                    
    ps.setInt(59receivedMOTB 0);
                    
    ps.setInt(60id);
                } else {
                    
    ps.setInt(59accountid);
                    
    ps.setString(60name);
                    
    ps.setInt(61world);
                }
                
    int updateRows ps.executeUpdate();
                if (!
    update) {
                    
    ResultSet rs ps.getGeneratedKeys();
                    if (
    rs.next()) {
                        
    this.id rs.getInt(1);
                    } else {
                        throw new 
    RuntimeException("Inserting char failed.");
                    }
                    
    rs.close();
                } else if (
    updateRows 1) {
                    throw new 
    RuntimeException("Character not in database (" id ")");
                }
                for (
    int i 03i++) {
                    if (
    pets[i] != null) {
                        
    pets[i].saveToDb();
                    }
                }
                
    ps.close();
                
    deleteWhereCharacterId(con"DELETE FROM keymap WHERE characterid = ?");
                
    /*            ps = con.prepaffreStatement("INSERT INTO keymap (characterid, `key`, `type`, `action`) VALUES (?, ?, ?, ?)");
                ps.setInt(1, id);
                for (Entry<Integer, MapleKeyBinding> keybinding : keymap.entrySet()) {
                ps.setInt(2, keybinding.getKey().intValue());
                ps.setInt(3, keybinding.getValue().getType());
                ps.setInt(4, keybinding.getValue().getAction());
                ps.addBatch();
                }
                ps.executeBatch();*/
                
    if (!keymap.isEmpty()) {
                    
    ps con.prepareStatement(prepareKeymapQuery());
                    
    ps.executeUpdate();
                    
    ps.close();
                }

                
    deleteWhereCharacterId(con"DELETE FROM skillmacros WHERE characterid = ?");
                
    ps con.prepareStatement("INSERT INTO skillmacros (characterid, skill1, skill2, skill3, name, shout, position) VALUES (?, ?, ?, ?, ?, ?, ?)");
                
    ps.setInt(1getId());
                for (
    int i 05i++) {
                    
    SkillMacro macro skillMacros[i];
                    if (
    macro != null) {
                        
    ps.setInt(2macro.getSkill1());
                        
    ps.setInt(3macro.getSkill2());
                        
    ps.setInt(4macro.getSkill3());
                        
    ps.setString(5macro.getName());
                        
    ps.setInt(6macro.getShout());
                        
    ps.setInt(7i);
                        
    ps.addBatch();
                    }
                }
                
    ps.executeBatch();
                
    ps.close();
                
    deleteWhereCharacterId(con"DELETE FROM telerockmaps WHERE characterId = ?");
                
    ps con.prepareStatement("INSERT into telerockmaps (characterId, mapId, type) VALUES (?, ?, ?)");
                
    ps.setInt(1id);
                for (
    int mapId rockMaps) {
                    
    ps.setInt(2mapId);
                    
    ps.setInt(30);
                    
    ps.addBatch();
                }
                for (
    int mapId vipRockMaps) {
                    
    ps.setInt(2mapId);
                    
    ps.setInt(31);
                    
    ps.addBatch();
                }
                
    ps.executeBatch();
                
    ps.close();
                List<
    Pair<IItemMapleInventoryType>> itemsWithType = new ArrayList<Pair<IItemMapleInventoryType>>();

                for (
    MapleInventory iv inventory) {
                    for (
    IItem item iv.list()) {
                        
    itemsWithType.add(new Pair<IItemMapleInventoryType>(itemiv.getType()));
                    }
                }

                
    ItemFactory.INVENTORY.saveItems(itemsWithTypeid);
                
    deleteWhereCharacterId(con"DELETE FROM skills WHERE characterid = ?");
                
    //    ps = con.prepareStatement("INSERT INTO skills (characterid, skillid, skilllevel, masterlevel) VALUES (?, ?, ?, ?)");
             /*   ps.setInt(1, id);
                for (Entry<ISkill, SkillEntry> skill : skills.entrySet()) {
                ps.setInt(2, skill.getKey().getId());
                ps.setInt(3, skill.getValue().skillevel);
                ps.setInt(4, skill.getValue().masterlevel);
                ps.addBatch();
                }
                ps.executeBatch();*/
                
    if (!skills.isEmpty()) {
                    
    ps con.prepareStatement(prepareSkillQuery());
                    
    ps.executeUpdate();
                    
    ps.close();
                }
                
    deleteWhereCharacterId(con"DELETE FROM savedlocations WHERE characterid = ?");
                
    ps con.prepareStatement("INSERT INTO savedlocations (characterid, `locationtype`, `map`, `portal`) VALUES (?, ?, ?, ?)");
                
    ps.setInt(1id);
                for (
    SavedLocationType savedLocationType SavedLocationType.values()) {
                    if (
    savedLocations[savedLocationType.ordinal()] != null) {
                        
    ps.setString(2savedLocationType.name());
                        
    ps.setInt(3savedLocations[savedLocationType.ordinal()].getMapId());
                        
    ps.setInt(4savedLocations[savedLocationType.ordinal()].getPortal());
                        
    ps.addBatch();
                    }
                }
                
    ps.executeBatch();
                
    ps.close();
                
    deleteWhereCharacterId(con"DELETE FROM buddies WHERE characterid = ? AND pending = 0");
                
    ps con.prepareStatement("INSERT INTO buddies (characterid, `buddyid`, `pending`, `group`) VALUES (?, ?, 0, ?)");
                
    ps.setInt(1id);
                for (
    BuddylistEntry entry buddylist.getBuddies()) {
                    if (
    entry.isVisible()) {
                        
    ps.setInt(2entry.getCharacterId());
                        
    ps.setString(3entry.getGroup());
                        
    ps.addBatch();
                    }
                }
                
    ps.executeBatch();
                
    ps.close();
                
    deleteWhereCharacterId(con"DELETE FROM queststatus WHERE characterid = ?");
                
    ps con.prepareStatement("INSERT INTO queststatus (`queststatusid`, `characterid`, `quest`, `status`, `time`, `forfeited`) VALUES (DEFAULT, ?, ?, ?, ?, ?)"Statement.RETURN_GENERATED_KEYS);
                
    PreparedStatement pse con.prepareStatement("INSERT INTO queststatusmobs VALUES (DEFAULT, ?, ?, ?)");
                
    ps.setInt(1id);
                for (
    MapleQuestStatus q quests.values()) {
                    
    ps.setInt(2q.getQuest().getId());
                    
    ps.setInt(3q.getStatus().getId());
                    
    ps.setInt(4, (int) (q.getCompletionTime() / 1000));
                    
    ps.setInt(5q.getForfeited());
                    
    ps.executeUpdate();
                    
    ResultSet rs ps.getGeneratedKeys();
                    
    rs.next();
                    for (
    int mob q.getMobKills().keySet()) {
                        
    pse.setInt(1rs.getInt(1));
                        
    pse.setInt(2mob);
                        
    pse.setInt(3q.getMobKills(mob));
                        
    pse.addBatch();
                    }
                    
    pse.executeBatch();
                    
    rs.close();
                }
                
    pse.close();
                
    ps.close();
                
    ps con.prepareStatement("UPDATE accounts SET `paypalNX` = ?, `mPoints` = ?, `cardNX` = ?, gm = ?, points = ?, `votepoints` = ?, `donationpoints` = ? WHERE id = ?");
                
    ps.setInt(1paypalnx);
                
    ps.setInt(2maplepoints);
                
    ps.setInt(3cardnx);
                
    ps.setInt(4gmLevel);
                
    ps.setInt(5points);
                
    ps.setInt(6votepoints);
                
    ps.setInt(7donationpoints);
                
    ps.setInt(8client.getAccID());
                
    ps.executeUpdate();
                
    ps.close();
                if (
    storage != null) {
                    
    storage.saveToDB();
                }
                
    ps con.prepareStatement("DELETE FROM wishlist WHERE `charid` = ?");
                
    ps.setInt(1id);
                
    ps.executeUpdate();
                
    ps.close();
                
    ps con.prepareStatement("INSERT INTO wishlist(`sn`, `charid`) VALUES(?, ?)");
                for (
    int sn wishList) {
                    
    ps.setInt(1sn);
                    
    ps.setInt(2id);
                    
    ps.addBatch();
                }
                
    ps.executeBatch();
                
    ps.close();
                if (
    gmLevel 0) {
                    
    ps con.prepareStatement("INSERT INTO gmlog (`cid`, `command`) VALUES (?, ?)");
                    
    ps.setInt(1id);
                    for (
    String com commands) {
                        
    ps.setString(2com);
                        
    ps.addBatch();
                    }
                    
    ps.executeBatch();
                }
                
    ps.close();
                
    con.commit();
                
    ps null;
            } catch (
    Exception e) {
                
    e.printStackTrace();
                try {
                    
    con.rollback();
                } catch (
    SQLException se) {
                }
            } 
    finally {
                try {
                    
    con.setAutoCommit(true);
                    
    con.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);
                } catch (
    Exception e) {
                }
            }
        } 
    MapleCharacter line 5588 :
    PHP Code:
    @Override
                
    public void run() {
                    
    client.getPlayer().saveToDB(true);  <<< line 5588
                
    }
            }, 
    300000); // 5 mins
        

    ItemFactory line 118:
    PHP Code:
    for (Pair<IItemMapleInventoryTypepair items) {
                
    IItem item pair.getLeft();
                
    MapleInventoryType mit pair.getRight();
                
    ps.setInt(1value);
                
    ps.setString(2account null String.valueOf(id));
                
    ps.setString(3account String.valueOf(id) : null);
                
    ps.setInt(4item.getItemId());
                
    ps.setInt(5mit.getType());
                
    ps.setInt(6item.getPosition());
                
    ps.setInt(7item.getQuantity());
                
    ps.setString(8item.getOwner());
                
    ps.setInt(9item.getFlag());
                
    ps.setInt(10item.getPetId()); <<<< line 118
                ps
    .setLong(11item.getExpiration());
                
    ps.setString(12item.getGiftFrom());
                
    ps.executeUpdate(); 
    TimerManager line140 :
    PHP Code:
    @Override
            
    public void run() {
                try {
                    
    r.run(); <<< line 140
                
    } catch (Throwable t) {
                }
            }
        }

    Last edited by xAlan; 22-01-12 at 08:00 PM.
    Nothing're Special :(


  8. #8
    Hardcore Member
    Rank
    Member
    Join Date
    Jan 2012
    Location
    Kota Kinabalu
    Posts
    130
    Liked
    6

    Re: v83 supremems source added ring effect bat error

    Bumb !
    Nothing're Special :(


 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •