Help With King Fox's Paid Highscore Script [ Server Side ]
Hi,
So i bought king fox's highscores script,
Its nice, i got the web side working.
But when i went to install server sided, i realzied the code was for 718 only.
Im currently trying to convert it, and ive got everything else working except for 2 methods
originally it was, player.getUsername, player.getRights and player.getSkill
but i fixed to player.PlayerName and player.playerRights as according to my player class
But i can seem to find anything in the same class about the skill, the only things in there are player.stopSkill
Code:
public void run() {
try {
if (!connect(HOST, DATABASE, USER, PASS)) {
return;
}
String name = player.playerName;
PreparedStatement stmt1 = prepare("DELETE FROM "+TABLE+" WHERE username=?");
stmt1.setString(1, player.playerName);
stmt1.execute();
PreparedStatement stmt2 = prepare(generateQuery());
stmt2.setString(1, player.playerName);
stmt2.setInt(2, player.playerRights);
stmt2.setLong(3, player.playerSkill().getTotalXp());
for (int i = 0; i < 25; i++)
stmt2.setInt(4 + i, (int)player.playerSkill().getXp()[i]);
stmt2.execute();
destroy();
} catch (Exception e) {
e.printStackTrace();
}
}
Only error part:
Code:
stmt2.setLong(3, player.playerSkill().getTotalXp());
for (int i = 0; i < 25; i++)
stmt2.setInt(4 + i, (int)player.playerSkill().getXp()[i]);
stmt2.execute();
Thanks in advance