Problem:I am doing a quest where it resets your killcount to zero, and sets kcReset = 1 (so I can track if it was reset or not, because after it is reset, the user is supposed to get x amount of kills to get a reward.
I set it equal to one in clicking buttons and that works and everything, and in playerSave.java I have it working where it reads it and such:
PlayerSave:
Code:
else if (token.equals("kcReset")) {
p.kcReset = Integer.parseInt(token2);
}
and
Code:
characterfile.write("kcRest = ", 0, 9);
characterfile.write(Integer.toString(p.kcReset), 0, Integer.toString(p.kcReset).length());
characterfile.newLine();
And in Player.java
Code:
public int kcReset;
So when it is set to 1 in game, it saves, but then I log back in and it is 1 again, then log out and it is 0!
Help if you can