I am having trouble using the hash function.
Dim RevisionCheck As Long
Dim exeinfo As String
Dim checksum As Long
Dim version As Long
exeinfo = Space(256)
RevisionCheck = z(App.Path & "\StarCraftJ.exe", _
App.Path & "\storm.dll", App.Path & "\battle.snp", _
modDeclares.ValueString, version, checksum, exeinfo, "IX86ver2.mpq")
If RevisionCheck = "0" Then
AddText vbRed, "Failed version check!"
frmMain.sckBnet.Close
Exit Sub
End If
Unfortunately, RevisionCheck is returning 0 every time. I'm not sure why. My value string is not the problem. thanks in advance.
If I remember correctly, the MPQ info is a long and it's the MPQ number, not the full string.
~-~(HDX)~-~
I dont think it is, I pull it out by
modDeclares.MPQName = Mid(Data, InStr(1, Data, "IX86ver"), Len(Data))
modDeclares.MPQName = Mid(MPQName, 1, 12)
and also its IX86ver4.mpq not 2, but that doesnt matter.. anyways, ive been using the MPQ name for SC/BW and its worked fine.
also::
im pulling out the hashcommand by
Case &H6
modDeclares.ValueString = Mid(Data, 24, Len(Data) - 2)
I'm refering to when passing it to Z()
RevisionCheck = z(App.Path & "\StarCraftJ.exe", _
App.Path & "\storm.dll", App.Path & "\battle.snp", _
modDeclares.ValueString, version, checksum, exeinfo, "IX86ver2.mpq")
Should be
RevisionCheck = z(App.Path & "\StarCraftJ.exe", _
App.Path & "\storm.dll", App.Path & "\battle.snp", _
modDeclares.ValueString, version, checksum, exeinfo, &H2)
Also I suggest you learn to use a 'debuffer' class. Like this (http://www.jbls.org/files/clsRemoveBuffer.cls)
Helps a lot in keeping ti straight in your mind.
~-~(HDX)~-~
Ok, I got it thanks
Use BNCSUtil (http://bncsutil.ionws.com/).
Quote from: Tazo on March 05, 2006, 07:34 PM
I dont think it is, I pull it out by
modDeclares.MPQName = Mid(Data, InStr(1, Data, "IX86ver"), Len(Data))
modDeclares.MPQName = Mid(MPQName, 1, 12)
Data = ...IX86ver1.mpq...
InStr(Data, "IX86ver1.mpq") = 4
MpqName = Mid(Data, 4) = "IX86ver1.mpq..."
MpqName = Mid(MpqName, 1, 12) = "IX86ver1.mpq"
MpqName = "IX86ver1.mpq"
That doesn't get the number and store it into a long variable..all it does is use the crappiest way possible to pull out a string from another string.
Quote from: Tazo on March 05, 2006, 07:34 PM
and also its IX86ver4.mpq not 2, but that doesnt matter.. anyways, ive been using the MPQ name for SC/BW and its worked fine.
By the way, there's more than just one IX86ver MPQ
People who don't use packet-reading classes just make me laugh.
Quote from: Joe on March 06, 2006, 12:56 AM
People who don't use packet-reading classes just make me laugh.
People who refer to temporary data buffers as "packet-reading classes" make me laugh.
The same pointless topics, arguments and scenarios being played out on these forums for the past several years makes me laugh.
Quote from: Lord[nK] on March 06, 2006, 01:06 AM
Quote from: Joe on March 06, 2006, 12:56 AM
People who don't use packet-reading classes just make me laugh.
People who refer to temporary data buffers as "packet-reading classes" make me laugh.
Oh? Well what should it be called, my king?
Quote from: Lord[nK] on March 06, 2006, 01:06 AM
Quote from: Joe on March 06, 2006, 12:56 AM
People who don't use packet-reading classes just make me laugh.
People who refer to temporary data buffers as "packet-reading classes" make me laugh.
Note that people typically aren't referring to data buffers themselves as the mechanisms by which meaningful data is read from them.