• Welcome to Valhalla Legends Archive.
 

Ping mess up... Kinda weird

Started by TeEhEiMaN, June 28, 2004, 03:55 PM

Previous topic - Next topic

TeEhEiMaN

Alright, you can see the problem in the screen shot, it doubles up the ping, on add username. And it also doesnt add the ops ping, maybe u can see the problem.



Heres the code also. and also the get plugin code isent working eiether in this code:

[Get ping code]

Public Function GetLagIcon(ByVal Ping As Long, Optional ByVal flag As Long) As Integer
Dim IconCode As Integer

If flag = 16 Or 32 Then
           GetLagIcon = 21
           Exit Function
End If

If (Ping >= 5) And (Ping <= 199) Then
   GetLagIcon = 15
End If
If (Ping >= 200) And (Ping <= 300) Then
   GetLagIcon = 16
End If
If (Ping >= 301) And (Ping <= 400) Then
   GetLagIcon = 17
End If
If (Ping >= 401) And (Ping <= 600) Then
   GetLagIcon = 18
End If
If (Ping >= 601) And (Ping <= 1200) Then
  GetLagIcon = 19
End If
If Ping > 1201 Then
   GetLagIcon = 20
End If
If (Ping < 0) Then
   GetLagIcon = 15
End If

         
End Function



And heres the "Here" event code.


flag = Form1.MakeLong(Mid$(Data, 9, 4))
Ping = Form1.MakeLong(Mid$(Data, 13, 4))
UserName = Decode.KillNull(Mid$(Data, 29))
Message = Decode.KillNull(Mid$(Data, Len(UserName) + 30))
Client = Left(Message, 4)
lagicoN = GetLagIcon(Ping)
   Select Case MakeLong(Mid$(Data, 5, 4))
       Case &H1 ' HERE

If flag = 2 Or flag = 18 Then
       Form1.Channel.ListItems.Add 1, , UserName, , 1
       Form1.Channel.ListItems.Item(Form1.Channel.ListItems.Count).ListSubItems.Add 1, , , lagicoN
         ElseIf Client = "PXES" Then
       Form1.Channel.ListItems.Add , , UserName, , 9
       Form1.Channel.ListItems.Item(Form1.Channel.ListItems.Count).ListSubItems.Add 1, , , lagicoN
               ElseIf Client = "RATS" Then
       Form1.Channel.ListItems.Add , , UserName, , 6
       Form1.Channel.ListItems.Item(Form1.Channel.ListItems.Count).ListSubItems.Add 1, , , lagicoN
               ElseIf Client = "VD2D" Then
       Form1.Channel.ListItems.Add , , UserName, , 5
       Form1.Channel.ListItems.Item(Form1.Channel.ListItems.Count).ListSubItems.Add 1, , , lagicoN
               ElseIf Client = "NB2W" Then
       Form1.Channel.ListItems.Add , , UserName, , 10
       Form1.Channel.ListItems.Item(Form1.Channel.ListItems.Count).ListSubItems.Add 1, , , lagicoN
               ElseIf Client = "PX2D" Then
       Form1.Channel.ListItems.Add , , UserName, , 13
       Form1.Channel.ListItems.Item(Form1.Channel.ListItems.Count).ListSubItems.Add 1, , , lagicoN
               ElseIf Client = "3RAW" Then
       Form1.Channel.ListItems.Add , , UserName, , 61
       Form1.Channel.ListItems.Item(Form1.Channel.ListItems.Count).ListSubItems.Add 1, , , lagicoN
         ElseIf Client = "PX3W" Then
       Form1.Channel.ListItems.Add , , UserName, , 65
       Form1.Channel.ListItems.Item(Form1.Channel.ListItems.Count).ListSubItems.Add 1, , , lagicoN
            ElseIf Client = "TAHC" Then
       Form1.Channel.ListItems.Add , , UserName, , 2
       Form1.Channel.ListItems.Item(Form1.Channel.ListItems.Count).ListSubItems.Add 1, , , lagicoN
           Else
       Form1.Channel.ListItems.Add , , UserName, , 12
       Form1.Channel.ListItems.Item(Form1.Channel.ListItems.Count).ListSubItems.Add 1, , , lagicoN
       
       
  thx, let me know



hismajesty

Also it didn't add me to the channel list!  >:(

UserLoser.

Note that milliseconds only go up to 1000, so your timestamp is providing a totally invalid time.

TeEhEiMaN

well, i can fix the time stamp... i just never noticed it =P.... ummm well does anyone know why the ping does that. It seems to stump a lot of people =P

Anubis

Quote from: TeEhEiMaN on June 28, 2004, 03:55 PM
Public Function GetLagIcon(ByVal Ping As Long, Optional ByVal flag As Long) As Integer
lagicoN = GetLagIcon(Ping)
       

It doesn't appear that you're calling the flag variable in your "Here" function/sub which always makes the falg variable be nothing, so it won't detect a lag plug. (See above)

Perhaps try something like:

lagicoN = GetLagIcon(Ping, Flags)

Just replace 'Flags' with whatever your flags variable is...

As for the double ping picture thingy, I have no clue...My bot is adding random people to it's room list 2 times when it shouldn't..heh

Hope this stuff helps,
Anubis

Lenny

#5
Check your column sizes for your ListView (most likely ping column), it could be a repainting problem.  Perhaps the column is too large or too small.

Also: To LW-Warrior, I always thought Cows slept standing up....
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

GoSuGaMING

Quote from: Lenny on July 03, 2004, 08:47 PM
Check your column sizes for your ListView (most likely ping column), it could be a repainting problem.  Perhaps the column is too large or too small.

Also: To LW-Warrior, I always thought Cows slept standing up....

I fixed his problem VIA realVNC :D

Lenny

What was the solution?  The ListView Column size?
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

GoSuGaMING

Quote from: Lenny on July 03, 2004, 10:36 PM
What was the solution?  The ListView Column size?

I dont know his code was all messy... i totally redid it all for him :X

MyndFyre

Quote from: GoSuGaMING on July 03, 2004, 10:58 PM
Quote from: Lenny on July 03, 2004, 10:36 PM
What was the solution?  The ListView Column size?

I dont know his code was all messy... i totally redid it all for him :X

To quote Code Complete:

Quote
To fix a bug without understanding the problem is just begging for another problem to come up later.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

GoSuGaMING

Quote from: Myndfyre on July 04, 2004, 04:07 AM
Quote from: GoSuGaMING on July 03, 2004, 10:58 PM
Quote from: Lenny on July 03, 2004, 10:36 PM
What was the solution?  The ListView Column size?

I dont know his code was all messy... i totally redid it all for him :X

To quote Code Complete:

Quote
To fix a bug without understanding the problem is just begging for another problem to come up later.


no, I showed him what I did... He watched me while I coded it... it has comments :X

Maddox

asdf.

MyndFyre

Quote from: GoSuGaMING on July 04, 2004, 11:53 AM
Quote from: Myndfyre on July 04, 2004, 04:07 AM
Quote from: GoSuGaMING on July 03, 2004, 10:58 PM
Quote from: Lenny on July 03, 2004, 10:36 PM
What was the solution?  The ListView Column size?

I dont know his code was all messy... i totally redid it all for him :X

To quote Code Complete:

Quote
To fix a bug without understanding the problem is just begging for another problem to come up later.


no, I showed him what I did... He watched me while I coded it... it has comments :X

So what you're saying is this....  You didn't understand the problem, so you provided a workaround?

Again I say: to fix a bug without understanding the problem is just begging for another problem to come up later.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

BaDDBLooD

#13
Very good advice, Thanks
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

GoSuGaMING

his code was way to messey :/ lol i didnt even wanna mess with it but i wanted to help :/