Hello DaniWeb community! I recently posted a question asking about the character creation screen and that it is all set! I then continued with form validation, and storing values and spitting them back out in a message box. Then I made the create a character screen close, and open the home screen, which is a bigger window with a different UI and functions. But if I got, say, the gender:
if (rdoMale.Checked) player1.Gender = "Male"; else player1.Gender = "Female";
And I go to my new form creation, I noticed that I cannot call player1 from my previous code
Player player1 = new Player(); where Player is my main player entity. The entity sets everything to 0 and " ". I also saw that if I call player1.gender on my new form it would not work, so I would have to call
Player player1 = new Player();which I believe would set my variables I just got, back to 0.
Is there a way I could store the variables from the character creation screen, then call them after I closed the window? Would it have to be written to a text file? Or could I make another class with it.
Any help is appreciated,