Lifecycle of a variable

weismana81

Member
Joined
Mar 8, 2005
Messages
10
Programming Experience
Beginner
Hello all,

I'm a newbie attemping a simple card game in vb.net. I've got the game working reasonably well, however, I'm trying to create sub procedures just to learn how. I have the variable "iusertotal" that holds the user's total. This variable changes throughout a single game based on events. The specific goal of the game ("you win" or "you lose") seems to be working fine. But all of the labels that display the variable do not change. I'm trying to change the value of "iusertotal" depending on what buttons are clicked, and as I said, the program does seem to be responded correctly, but will not display changes in labels. Is there a way to "empty" or "clear" that variable from event to event? Or should I be handling this in a completely different way?

I hope that makes sense. I'm very sorry if this is a silly question, but I just can't seem to get behond it.

Any help is much appreciated!!!!
Thanks!
 

weismana81

Member
Joined
Mar 8, 2005
Messages
10
Programming Experience
Beginner
Thank you for the response!

I've got it working now. It looks like the variable was working fine, but I wasn't updating the label where I needed to.

But again, thank you for the response.
 
Top Bottom