0
I am beginner in VB.NET and I am creating a simple simulation game, have hunger, thirst etc, in the hunger progressibar the maximum that arrives is 100.
When you eat something restores 5, if I’m 98 and as it gives error.
I was wondering if you have any code to specify that the maximum you can get is 100
Like for example being 98 hungry and instead of going to 103 go to 100, only restoring 2.
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
ProgressBar2.Value = Fome
Module Module1
Public Fome As Integer = 100
Thanks for the help, it worked.
– Lucas
@Lukasoliver If it worked, don’t forget to mark the answer as right. =)
– Pagotti