I have recently attempted to add a new variable onto the char files, using a minigame base i found on my server. This is what i added...
Code:
characterfile.write("character-saradomin = ", 0, 22);
characterfile.write(Integer.toString(saraKills), 0, Integer.toString(saraKills).length());
characterfile.newLine();
characterfile.write("character-anchor = ", 0, 23);
characterfile.write(Integer.toString(anchor), 0, Integer.toString(anchor).length());
characterfile.newLine();
Code:
} else if (token.equals("character-saradomin")) {
saraKills = Integer.parseInt(token2);
} else if (token.equals("character-anchor")) {
saraKills = Integer.parseInt(token2);
Code:
public int saraKills;
public int anchor;
The base was the saradomin kills and the new added was the anchor part...
Doing this made me unable to save a char file giving me this error...
Code:
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
String index out of range: 23
[Anyname]: Failed to load player: Anyname
[null]: Disconnected
Please help... I will rep!!!