• Welcome to Valhalla Legends Archive.
 

Array() w/Integer

Started by CrAz3D, March 10, 2004, 10:42 AM

Previous topic - Next topic

CrAz3D

I think this applies more here than the topic "Profile Help" I originally posted in of Outlawz-Gosu.

When I request my keys, whether it be:
   PacketBuf.InsertNTString "System\Username"
   PacketBuf.InsertNTString "System\Account Created"
   PacketBuf.InsertNTString "System\Last Logon"
   PacketBuf.InsertNTString "System\Last Logoff"
   PacketBuf.InsertNTString "System\Time Logged"

or
   PacketBuf.InsertNTString "profile\sex"
   PacketBuf.InsertNTString "profile\age"
   PacketBuf.InsertNTString "profile\location"
   PacketBuf.InsertNTString "profile\description"

They are return in the order that I sent them, but not in the order that they Split().

IE:
Quote'[6:41:54 PM] 2 29608520 1681102539     created
'[6:41:54 PM] 3 29623872 3218976033         logon
'[6:41:54 PM] 4 29623863 3142340068         log off
'[6:41:54 PM] 5 97642                       time logged
Today is being returned as:
Quote
[7:33:35 AM] 4 29622090 1673424946               created
[7:33:35 AM] 5 29623980 2731395027               logon
[7:33:35 AM] 6 29623979 2869513927               logoff
[7:33:35 AM] 7 509            time logged
The index of the order in the string as each is returned is infront of the rest for the string.  Is there a way to display the Profile info with trying to display SplitProfile(4)?


EDIT:Forgot Splitting code

   For i = 1 To UBound(SplitProfile)
       If i = 3 Then
           SPP = Split(SplitProfile(3), " ")
           FT.dwHighDateTime = SPP(0)
           FT.dwLowDateTime = SPP(1)
           Call FileTimeToLocalFileTime(FT, FT)
           Call FileTimeToSystemTime(FT, st)
           TIMEO = st.wHour & ":" & st.wMinute & ":" & st.wSecond
           TIMEO = Format(TIMEO, "hh:mm:ss ampm")
           AddChat vbGreen, "Account Created: ", vbCrLf & &HC0C000, st.wMonth & "/" & st.wDay & "/" & st.wYear, vbCrLf & vbRed, " @ ", vbCrLf & &HC0C000, TIMEO
       ElseIf i = 4 Then
           SPP = Split(SplitProfile(4), " ")
           FT.dwHighDateTime = SPP(0)
           FT.dwLowDateTime = SPP(1)
           Call FileTimeToLocalFileTime(FT, FT)
           Call FileTimeToSystemTime(FT, st)
           TIMEO = st.wHour & ":" & st.wMinute & ":" & st.wSecond
           TIMEO = Format(TIMEO, "hh:mm:ss ampm")
           AddChat vbGreen, "Last Logon: ", vbCrLf & &HC0C000, st.wMonth & "/" & st.wDay & "/" & st.wYear, vbCrLf & vbRed, " @ ", vbCrLf & &HC0C000, TIMEO
       ElseIf i = 5 Then
           SPP = Split(SplitProfile(5), " ")
           FT.dwHighDateTime = SPP(0)
           FT.dwLowDateTime = SPP(1)
           Call FileTimeToLocalFileTime(FT, FT)
           Call FileTimeToSystemTime(FT, st)
           TIMEO = st.wHour & ":" & st.wMinute & ":" & st.wSecond
           TIMEO = Format(TIMEO, "hh:mm:ss ampm")
           AddChat vbGreen, "Last Log Off: ", vbCrLf & &HC0C000, st.wMonth & "/" & st.wDay & "/" & st.wYear, vbCrLf & vbRed, " @ ", vbCrLf & &HC0C000, TIMEO
       ElseIf i = 6 Then
           AddChat vbGreen, "Time Logged: ", vbCrLf & &HC0C000, ConvertTime(SplitProfile(6) * 1000)
       End If
   Next i
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

CrAz3D

dim ReadNow as boolean
ReadNow =false
For i = 0 To UBound(Array())

  if ReadNow then
     if i = CR+1 then
        stuff for cr+1
     end if
     if i= CR+2 then
       stuff for cr+2
     end if
     if i= CR+3 then
       stuff for cr+3
     end if
     if i= CR+4 then
       stuff for cr+4
     end if
     :
  end if
  If instr(1,Array(i),ProfName) > 0 Then
     ReadNow = true
     CR = i
  end if

next i


I got that from ppl @ visualbasicforum.com, they helped quite good.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

o.OV

both parse codes posted look ridiculous
If the facts don't fit the theory, change the facts. - Albert Einstein

CrAz3D

I thought so too, but it works so ... pfft
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...