Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Dale on June 01, 2006, 06:17 PM

Title: Checkrevision failure
Post by: Dale on June 01, 2006, 06:17 PM
Could someone list out why check revision would fail? Other then the obvious reason of hashes in wrong directory.


...Ugh Fuck sorry guys, wrong place to post.
Title: Re: Checkrevision failure
Post by: topaz on June 01, 2006, 06:50 PM
Bad hashes?
Title: Re: Checkrevision failure
Post by: Dale on June 01, 2006, 07:09 PM
Uh, Yeah other then that, as in coding errors.
Title: Re: Checkrevision failure
Post by: warz on June 01, 2006, 07:58 PM
Naturally, some pasted code would help us find coding errors.
Title: Re: Checkrevision failure
Post by: UserLoser on June 01, 2006, 10:14 PM
CheckRevision() shouldn't fail because you shouldn't be able to run the game without the necessary files.  The first file uses GetModuleHandle(NULL) instead of CreateFile() for the handle...Contact Blizzard Tech Support using another client that works to let them know of your problems.
Title: Re: Checkrevision failure
Post by: Dale on June 02, 2006, 02:02 PM
Heh, I'll send you the coding but it's messy as hell.  ::)
Title: Re: Checkrevision failure
Post by: Dale on June 02, 2006, 02:08 PM
Alrighty, here is where it gives me check revision failure.


  HF = GetHashFiles
                          Debugtxt vbYellow, "Checking hashfiles..."
                    If (checkRevision(ValueString, HF(0), HF(1), HF(2), NewMPQNumber, Checksum) = False) Then
                        frmMain.SckBnet.Close
                        AppendText LtRed, "Checkrevision failed!"
                        Exit Function
                    End If


This is the GetHashFiles function


Public Function GetHashFiles() As String()

    Dim HashFiles(2) As String
   
        Select Case UCase(BOT_PRODUCT)
            Case "RATS", "PXES"
                HashFiles(0) = App.Path & "\STAR\starcraft.exe"
                HashFiles(1) = App.Path & "\STAR\storm.dll"
                HashFiles(2) = App.Path & "\STAR\battle.snp"
        End Select

End Function
Title: Re: Checkrevision failure
Post by: Yegg on June 02, 2006, 02:09 PM
You showed us the call to CheckRevision. You didn't show us the code for CheckRevision or atleast where you got it from and you didn't show us the data of the variables being sent to CheckRevision.
Title: Re: Checkrevision failure
Post by: Dale on June 02, 2006, 02:25 PM
Alright, I see.
Title: Re: Checkrevision failure
Post by: topaz on June 02, 2006, 02:26 PM
Quote from: dlStevens on June 02, 2006, 02:08 PM
Alrighty, here is where it gives me check revision failure.


  HF = GetHashFiles
                          Debugtxt vbYellow, "Checking hashfiles..."
                    If (checkRevision(ValueString, HF(0), HF(1), HF(2), NewMPQNumber, Checksum) = False) Then
                        frmMain.SckBnet.Close
                        AppendText LtRed, "Checkrevision failed!"
                        Exit Function
                    End If


This is the GetHashFiles function


Public Function GetHashFiles() As String()

    Dim HashFiles(2) As String
   
        Select Case UCase(BOT_PRODUCT)
            Case "RATS", "PXES"
                HashFiles(0) = App.Path & "\STAR\starcraft.exe"
                HashFiles(1) = App.Path & "\STAR\storm.dll"
                HashFiles(2) = App.Path & "\STAR\battle.snp"
        End Select

End Function


That looks off, for some reason...
Title: Re: Checkrevision failure
Post by: Dale on June 02, 2006, 02:30 PM
Yeah, I fixed a few things that were pretty messed up, but uh now im sending 0x50 ok, but then I get IP Banned.
Title: Re: Checkrevision failure
Post by: rabbit on June 02, 2006, 05:04 PM
Then you're obviously not sending it ok.
Title: Re: Checkrevision failure
Post by: Dale on June 02, 2006, 05:59 PM
Well, thats not necessarily true, you can get IP Banned for other reasons, it's just like saying when you spam, get IP Banned your sending 0x50 wrong. Which isn't true.
Title: Re: Checkrevision failure
Post by: warz on June 02, 2006, 06:50 PM
No... but, you ARE sending 0x50 wrong and getting ip banned for it. So, really, comparing this to spamming in this situation isn't really the same. You can't even spam yet. :-)
Title: Re: Checkrevision failure
Post by: Dale on June 02, 2006, 07:21 PM
Hah, True I can't, considering I don't have any chatting events (not that matters) but hrm...So could this whole Check Revision Failure be due to my 0x50 wrong?
Title: Re: Checkrevision failure
Post by: UserLoser on June 03, 2006, 02:10 AM
Wth is this, doesn't look like CheckRevision() to me!
Title: Re: Checkrevision failure
Post by: Dale on June 03, 2006, 09:51 AM
 :o :-[ ::)
Title: Re: Checkrevision failure
Post by: rabbit on June 03, 2006, 01:17 PM
That's really not helpful at all.

A bad outgoing packet construct won't have any effect on a local routine's result.
Title: Re: Checkrevision failure
Post by: Dale on June 03, 2006, 01:57 PM
Hm alright, I'll work on it a little more, and check some other things out.
Title: Re: Checkrevision failure
Post by: Mystical on June 04, 2006, 03:45 PM
Quote from: dlStevens on June 02, 2006, 02:08 PM
Alrighty, here is where it gives me check revision failure.


  HF = GetHashFiles
                          Debugtxt vbYellow, "Checking hashfiles..."
                    If (checkRevision(ValueString, HF(0), HF(1), HF(2), NewMPQNumber, Checksum) = False) Then
                        frmMain.SckBnet.Close
                        AppendText LtRed, "Checkrevision failed!"
                        Exit Function
                    End If


This is the GetHashFiles function


Public Function GetHashFiles() As String()

    Dim HashFiles(2) As String
   
        Select Case UCase(BOT_PRODUCT)
            Case "RATS", "PXES"
                HashFiles(0) = App.Path & "\STAR\starcraft.exe"
                HashFiles(1) = App.Path & "\STAR\storm.dll"
                HashFiles(2) = App.Path & "\STAR\battle.snp"
        End Select

End Function




*cough*


Public Sub GetHashFiles(HashFiles() As String)
   
   Select Case UCASE(BOT_PRODUCT)
   
        Case "RATS", "SEXP"
         
            HashFiles(0) = App.Path & "\STAR\starcraft.exe"
            HashFiles(1) = App.Path & "\STAR\storm.dll"
            HashFiles(2) = App.Path & "\STAR\battle.snp"

        Case Else
            Debug.Print "hmmm..?"

    End Select

Exit Sub



another question why is it in a function your not returning nothing as GetHashFiles




HF = GetHashFiles
                          Debugtxt vbYellow, "Checking hashfiles..."
                    If (checkRevision(ValueString, HF(0), HF(1), HF(2), NewMPQNumber, Checksum) = False) Then
                        frmMain.SckBnet.Close
                        AppendText LtRed, "Checkrevision failed!"
                        Exit Function
                    End If


don't make things harder then it should be.. -_-



                          Debugtxt vbYellow, "Checking hashfiles..."
                    If (checkRevision(ValueString, HashFiles(0), HashFiles(1), HashFiles(2), NewMPQNumber, Checksum) = False) Then
                        frmMain.SckBnet.Close
                        AppendText LtRed, "Checkrevision failed!"
                        Exit Function
                    End If