• Welcome to Valhalla Legends Archive.
 

Converting 1B to 27... how??? (solved)

Started by phvckmeh, August 01, 2004, 04:22 AM

Previous topic - Next topic

ChR0NiC

Quote from: phvckmeh on August 01, 2004, 02:45 PM
Thats what i needed, thanks!

Were you referring to my code or the other guy's code.

phvckmeh

Quote from: ChR0NiC on August 01, 2004, 02:08 PM
All you need to do to get the number of members is


Asc(Mid(Data, 9, 1))


Because it's located after the [DWORD]Cookie. You don't need to write some waste of memory function......

this one!

Blaze

Trust gave me this...


Function HexToDec(HexStr As String) As Long
Dim strlen As Integer
Dim Ctr As Integer
Dim Word As String * 1
Dim lngTemp As Long

   strlen = Len(HexStr)
   
   HexStr = UCase(HexStr)
   
   For Ctr = strlen To 1 Step -1
       
       Word = Left$(HexStr, 1)
       
       HexStr = Mid(HexStr, 2, Len(HexStr) - 1)
       
       Select Case Word
           
           Case "0"
               lngTemp = lngTemp
           Case "1"
               lngTemp = (16 ^ (Ctr - 1)) * 1 + lngTemp
           Case "2"
               lngTemp = (16 ^ (Ctr - 1)) * 2 + lngTemp
           Case "3"
               lngTemp = (16 ^ (Ctr - 1)) * 3 + lngTemp
           Case "4"
               lngTemp = (16 ^ (Ctr - 1)) * 4 + lngTemp
           Case "5"
               lngTemp = (16 ^ (Ctr - 1)) * 5 + lngTemp
           Case "6"
               lngTemp = (16 ^ (Ctr - 1)) * 6 + lngTemp
           Case "7"
               lngTemp = (16 ^ (Ctr - 1)) * 7 + lngTemp
           Case "8"
               lngTemp = (16 ^ (Ctr - 1)) * 8 + lngTemp
           Case "9"
               lngTemp = (16 ^ (Ctr - 1)) * 9 + lngTemp
           Case "A"
               lngTemp = (16 ^ (Ctr - 1)) * 10 + lngTemp
           Case "B"
               lngTemp = (16 ^ (Ctr - 1)) * 11 + lngTemp
           Case "C"
               lngTemp = (16 ^ (Ctr - 1)) * 12 + lngTemp
           Case "D"
               lngTemp = (16 ^ (Ctr - 1)) * 13 + lngTemp
           Case "E"
               lngTemp = (16 ^ (Ctr - 1)) * 14 + lngTemp
           Case "F"
               lngTemp = (16 ^ (Ctr - 1)) * 15 + lngTemp
           
           Case Else
       End Select
       
   Next
   HexToDec = lngTemp
   
End Function
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

hismajesty

Yea but I didn't write that nor do I use it. It was part of a module I found somewhere a while ago and uploaded for my friend. You should have just pasted the whole link. :P

http://www.digitaldoozie.net/HexWorks.bas

Blaze

If they don't know how to operate a function as easy as that, they have bad chance of succesfully making a non-csb, non-chat bot.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No