You're putting a function in a sub.
ok i got it but for some reason i get this error and i dont know want it means ? any help ? ty
Code:Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Function FKDR(ByVal Kills As String, ByVal Deaths As String, ByVal KDR As String) Dim Result As Double If KDR = 0 Then Result = Kills / Deaths Else Result = KDR * Kills - Deaths End If If KDR < 1 Then Return Format(Result, "0.00") Else Return Format(Result, "0") End If End Function
PlayStation ID:Boxing509
Originally Posted by pushdis15
You're putting a function in a sub.
Last edited by NOOB; 01-19-2011 at 09:24 AM.
D: wow lol
PlayStation ID:Boxing509
Originally Posted by pushdis15
I PMEd him something different. Consider this thread as Solved
No I do not make game hacks anymore, please stop asking.
if Deaths is 0 it triggers a divide by 0 exception.
You've got a function in a sub, possibly dividing by zero.. and you're checking and multiplying strings |:
Will post corrected code when I get home
Why would someone use a KDR calculator if they had no deaths?