Recently in the game im making I added in a shop function. First I added in "Offensive Items" and "Defensive Items" options. All the items you could buy in there worked just fine. Then I added in "Potions" as an option and now im having some troubles.
When you select the potions option it loads all the potions and their prices and everything just like it should. After selecting a potion it should open addPotion(). Well, it opens addPotion() but the only thing that appears, thats supposed to, is "Select a potion slot:". Which is where you would pick 1 of three slots to store the potion so you can access it in battle.
Yet when you pick your potion it opens addPotion(), says to pick a slot then I get an error report. The error report pops up and says the program needs to close. Ive tried my game on about 10 different computers and I get the same problem on all of them.
Just from that can anyone tell me why I may be getting this problem? And a possible way to fix it.