Jump to content
  • 0

[HELP]Inputing Fame System


Question

Posted

Hello guys i am trying to input this code on my L2j Frozen Last Rev(957) Pack

http://maxcheaters.com/forum/index.php?topic=140041.0

 

I do all the things that code says, i have no error when compiling but when i log in and try creat a character i receive this error:

errorztf.png

 

Please help me i want this addition SO MUCH!

Thanks in advance.

5 answers to this question

Recommended Posts

  • 0
Posted

Problem should be somewhere  here

 

 

  private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,killingSpree=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,chat_filter_count=?,specialTitle=? WHERE obj_id=?";
   private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, killingSpree, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,chat_filter_count,hero,premium,platinum,schemebuffs,specialTitle FROM characters WHERE obj_id=?";
@@
   setPvpKills(getPvpKills() + 1);
+   setFame(getFame() + 1);

@@
   private boolean createDb()
   {
      java.sql.Connection con = null;
      try
      {
         con = L2DatabaseFactory.getInstance().getConnection();
         PreparedStatement statement;
         statement = con.prepareStatement("INSERT INTO characters "
                     + "(account_name,obj_Id,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,"
                     + "acc,crit,evasion,mAtk,mDef,mSpd,pAtk,pDef,pSpd,runSpd,walkSpd,"
                     + "str,con,dex,_int,men,wit,face,hairStyle,hairColor,sex,"
                     + "movement_multiplier,attack_speed_multiplier,colRad,colHeight,"
                     + "exp,sp,karma,fame,pvpkills,pkkills,killingSpree,clanid,maxload,race,classid,deletetime,"
                     + "cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,"
                     + "base_class,newbie,nobless,power_grade,last_recom_date,specialTitle) "
                     + "values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");

 

ensure that you added it corectly, you included  " fame "  in character table too in your database ?

  • 0
Posted

ensure that you added it correctly, you include "fame" in character table too in your database ?

 

Yes i did all the way it says and add to tables "fame decimical not null default 0" but i get that :(

 

EDIT: I saw that the screen has missed a line here what it say on top:

Could not insert char data: java.sql.SQLException: Parameter index out of range
(62 > number of parameters, which is 61).
Client: Account..... blablabla

  • 0
Posted

you added " fame "  here manualy or you copy paste ?

do you added and one more " ? "in values if you added manualy ?

better add them manualy cause is different pack

                    + "(account_name,obj_Id,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,"
                     + "acc,crit,evasion,mAtk,mDef,mSpd,pAtk,pDef,pSpd,runSpd,walkSpd,"
                     + "str,con,dex,_int,men,wit,face,hairStyle,hairColor,sex,"
                     + "movement_multiplier,attack_speed_multiplier,colRad,colHeight,"
                     + "exp,sp,karma,fame,pvpkills,pkkills,killingSpree,clanid,maxload,race,classid,deletetime,"
                     + "cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,"
                     + "base_class,newbie,nobless,power_grade,last_recom_date,specialTitle) "
                     + "values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");

         statement.setInt(24, getKarma());
+         statement.setInt(25, getFame());
         statement.setInt(26, getPvpKills());
         statement.setInt(27, getPkKills());

 

(62 > number of parameters, which is 61).

 

this error is caused of these things...

 

make every thing manualy cause is more safe

  • 0
Posted

make every thing manualy cause is more safe

I made them all manually on UPDATE_CHARACTER i add karma=?,fame=?,......

on RESTORE_CHARACTER i add karma,fame,......

 

I add all this thing statement.setInt(25, getFame());

and change the number of the following +1

 

And still i get this error i have tried so many different things and nothing... :(

  • 0
Posted

Bump!

Please someone help me, i am trying so much to find whats the problem is because i have just started understading java please someone with better experience help me.

Thanks in advance!

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
×
×
  • 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