Search the Community
Showing results for tags 'spacing'.
Found 1 result
-
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: [CODE] 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: [CODE] 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]); door++; }[/CODE] EDIT: RESOLVED. 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.