Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (527)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (594)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Text Adventure loosely based on "Oblivion", help with bug  (Read 1158 times)
0 Members and 1 Guest are viewing this topic.
Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Posted 2011-12-13 02:04:40 »

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.

Check out my website!
Offline CyanPrime
« Reply #1 - Posted 2011-12-13 02:35:14 »

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.
Offline gbeebe

Senior Devvie


Medals: 5
Projects: 1



« Reply #2 - Posted 2011-12-13 02:36:49 »

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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CyanPrime
« Reply #3 - Posted 2011-12-13 02:39:56 »

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

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


Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #4 - Posted 2011-12-13 02:42:00 »

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

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




Didn't work :/

Check out my website!
Offline CyanPrime
« Reply #5 - Posted 2011-12-13 02:43:03 »

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

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




Didn't work :/
Is it spitting errors at you of any kind?
Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #6 - Posted 2011-12-13 02:46:31 »

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.


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

Check out my website!
Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #7 - Posted 2011-12-13 02:49:52 »

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

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




Didn't work :/
Is it spitting errors at you of any kind?

Nope. Just closing.

Check out my website!
Offline gbeebe

Senior Devvie


Medals: 5
Projects: 1



« Reply #8 - Posted 2011-12-13 02:56:16 »

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;
Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #9 - Posted 2011-12-13 03:25:22 »

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 Smiley +1!

Check out my website!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

PocketCrafter7 (12 views)
2014-11-28 16:25:35

PocketCrafter7 (8 views)
2014-11-28 16:25:09

PocketCrafter7 (8 views)
2014-11-28 16:24:29

toopeicgaming1999 (75 views)
2014-11-26 15:22:04

toopeicgaming1999 (65 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (28 views)
2014-11-24 19:59:16
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!