Jump to content
  • 0
Sign in to follow this  
Mahdy

HELP! Shops. adding shops, items, please help...

Question

I am not a java developer by any means. Web developing is all me, however, my developer is on break so I am adding new items into shop/new shops.

I followed this tutorial:
[url]https://www.moparscape.org/smf/index.php?topic=549994.0[/url]

Entered this into shops.cfg:
[CODE]shop = 1 Armor_Shop 1 1 1158 250 1120 250 1106 250 1070 250 1084 205[/CODE]

This inside ActionHandler under any case:
[CODE]case 2538:
c.getShops().openShop(1);
break;[/CODE]

[CODE]And, this is the error I am getting.. I do not know why.
Loaded 5113 npc drops for 331 npcs in 111ms.
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
at server.world.ShopHandler.loadShops(ShopHandler.java:145)
at server.world.ShopHandler.<init>(ShopHandler.java:45)
at server.Server.<clinit>(Server.java:76)[/CODE]

1st error shows this once I click it:
[CODE]ShopSModifier[ShopID] = Integer.parseInt(token3[2]);[/CODE] (Never added this)

[IMG]http://i.gyazo.com/8a9cc24a586692a196afd3dfe7fc5adb.png[/IMG]

Second:
[CODE]loadShops("shops.cfg");[/CODE]
[IMG]http://i.gyazo.com/be5c82fb2a8afc7c043ba1478187c4d0.png[/IMG]

Third:
[CODE]public static ShopHandler shopHandler = new ShopHandler();[/CODE]
[IMG]http://i.gyazo.com/b4e36fbbdc3126dfdba6a7029f1aa538.png[/IMG]

I have not touched ANY of these files, and, before this, the server was online with no errors. What the fuck did I do wrong... :(

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
did you use tabs instead of spaces when entering shop items/amounts ?

Share this post


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

×