"If the facts don't fit the theory, get new facts" --Albert Einstein
"If the facts don't fit the theory, get new facts" --Albert Einstein
Hunter McMillen wrote:can you post your character class? one of your other methods must be changing that value. Also in your debug statements does your name print out correctly?
Hunter
"If the facts don't fit the theory, get new facts" --Albert Einstein
Hunter McMillen wrote:I see the problem. In save game:
you create a new character then try to retrieve that characters name. This character doesn't have a name because you just created it. You need to get the name of the character you created before inside charactersSetup.
Hunter
"If the facts don't fit the theory, get new facts" --Albert Einstein
Hunter McMillen wrote:Ok well when you create a new character object. You basically create a blank slate, the character object doesn't have a name. So when you call the getCharacterName() method it is trying to return a name that doesn't exist and is printing out null. Does that help?
Hunter
matthew christensen wrote:
Hunter McMillen wrote:Ok well when you create a new character object. You basically create a blank slate, the character object doesn't have a name. So when you call the getCharacterName() method it is trying to return a name that doesn't exist and is printing out null. Does that help?
Hunter
OK im following, So how would i access the value for name?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Don't get me started about those stupid light bulbs. |