Jump to content
  • 0
Sign in to follow this  
A Duck Tale

Weird spacing error in door.cfg (PI)


Currently i am working on opening a few doors here and there, however upon writing in my first door, I get an error when i try to run my server:
[CODE]Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.ArrayIndexOutOfBoundsException: 30
at server.world.ObjectHandler.loadDoorConfig(ObjectHandler.java:285)
at server.world.ObjectHandler.<init>(ObjectHandler.java:29)
at server.Server.<clinit>(Server.java:50)
Press any key to continue . . .[/CODE]

I'm fair sure the problem is the Object Handler reading in 30 instead of what i actually want it to read. The data i entered into my doors.cfg is this:

door = 3098 3107 0 -3 0 //Runescape Guides house door(tutorial island)[/CODE]

I have used the tab key in between each value(as the spacebar is known to cause this issue),so I was wondering how to go about fixing this problem. :/

Code in objectHandler:

if (token.equals("door")) {
doors[door][0] = Integer.parseInt(token3[0]); //line 285
doors[door][1] = Integer.parseInt(token3[1]);
doors[door][2] = Integer.parseInt(token3[2]);
doors[door][3] = Integer.parseInt(token3[3]);
doors[door][4] = Integer.parseInt(token3[4]);


Feel like such a nub for missing such an obvious error. So to anyone else who encounters this problem,
search for:
public static final int MAX_DOORS
in ObjectHandler and change the max to however many doors you are adding. Edited by A Duck Tale

Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
I havn't seen conventions like this, since project-Czaar...

Share this post

Link to post
Share on other sites
Sign in to follow this