Hey guys im making a exp calculator for fishing on a game. I am pretty new to programming and I am unsure on how to calculate the multiple values that are needed to calculate the exp. I will post the code I have so far most of it is useless because i was just experimenting but if someone could fix up my code or give me advice that would be much appreciated!
Numfish is the ammount of fish the user has.
numcat is the number of cat fish a user has.
num pig is the number of piglet fish a user has.
num spec is the number of special items a user has.
Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim numfish As Integer = TextBox1.Text
Dim numcat As Integer = TextBox2.Text
Dim numpig As Integer = TextBox3.Text
Dim numspec As Integer = TextBox4.Text
Dim fishexp As Integer = numfish
Dim catexp As Integer = numcat * "5"
Dim pigexp As Integer = numpig * "10"
Dim specexp As Integer = numspec * "20"
Dim dofish As Integer = "0"
Dim dopig As Integer = "0"
Dim docat As Integer = "0"
Dim dospec As Integer = "0"
If CheckBox1.Checked = True Then
dofish = "1"
End If
If CheckBox2.Checked = True Then
docat = "1"
End If
If CheckBox3.Checked = True Then
dopig = "1"
End If
If CheckBox4.Checked = True Then
dospec = "1"
End If
Dim final As Integer = "0"
Dim whatused As Integer = "0"
If docat = "1" Then
final = final + fishexp
End If
If dofish = "1" Then
final = final + fishexp
End If
If dopig = "1" Then
final = final + pigexp
End If
If dospec = "1" Then
final = final + specexp
End If
MessageBox.Show(final)
End Sub
End Class
If you need anymore information or a attachment I can get it for you.