Originally Posted by
Hexx
is it not even smaller than that? i always thought it was around 32k.
An Integer (in vb6) is 2 bytes, ranging from -32768 to 32767. Longs can go up to (2^31-1) which is slightly over 2.147 billion.
Code:
Private Sub Command1_Click()
Dim strhtml As String
a = 0
If Text1 > 10 Then 'Specify you are comparing Text1.Text (also convert .Text to an integer)
Log.AddItem "The Max. # of eggs"
Log.AddItem " can select is 10."
ElseIf Text3 > Label6 Then 'Specify you are comparing .Text and .Caption respectively. Convert both to integers
Log.AddItem "You cannot bet more than"
Log.AddItem Label6 & "neopoints!" '.Text
Else
Log.AddItem "Started Gambling"
c = 0
' endnp = 0
endnp = CInt(Replace(GetStringBetween(strhtml, "NP: <a id='npanchor' href=""/objects.phtml?type=inventory"">", "</a>"), ",", vbNullString)) 'assuming endnp is an integer
Do Until c = Text 'Try using c >= Text
'(my secret stuffs xD)
Loop
np = CInt(Replace(GetStringBetween(strhtml, "NP: <a id='npanchor' href=""/objects.phtml?type=inventory"">", "</a>"), ",", vbNullString)) 'assuming np is an integer
NPOH1 = np & " Neopoints On Hand" '.Caption
Log.AddItem "Total Profit: " & (np - endnp) & " Neopoints."
Log.AddItem "Done Gambling"
End If
End Sub
Read the comments I included.