Text Adventure loosely based on "Oblivion", help with bug

I have a bug in my game that causes it to randomly close when the player goes into the equip menu then tries to leave it. Can you guys please take a look at it?

Here’s a link to the code:

http://www.mediafire.com/?g2lkh13agbwk5se

P.S. - If you see anything else in the code that could be improves, please let me know, but keep in mind I’m very new to the Java scene.

Looking into it. Would be nice to know where the equip menu is though…

All those 280’s for iron dagger should be a int variable called ironDaggerCost, or IRON_DAGGER_COST if it don’t change.

Is this when the user types “exit” in the equip menu? Or when Sal.Save() is called? I would put a message saying “saved” in there so you can see if that point was reached.

I think it’s cause determiningInv doesn’t go back to true when leaving the equip menu?


if (input.equals("leave") || input.equals("l"))
		{
			itemEquipping = false;
			determiningInv = true; /* <--- line I added in */
		}

Didn’t work :confused:

Is it spitting errors at you of any kind?

No, in Imperial City when you type i for inventory, then e for equip, then type l to leave it happens.

Nope. Just closing.

Are you sure the game is in the right spot when you type “e”, it may mean “exit” which is calling SaL.Save() which has running = false;

WOW. Thanks, I NEVER would have thought of this! You sir are a genius :slight_smile: +1!