Shoutbox

Doing math in a VB dll - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Doing math in a VB dll (/showthread.php?tid=30640)

Doing math in a VB dll by gone on 08-28-2004 at 11:19 PM

I just started tinkering with Plus! plugins today and I'm writing a ping function,  my side pings the other, the other responds then I want to report the MS it took to respond, but when I try to do math that part just doesn't respond then but if I take the math out it works. Here is what the section looks like.

If sContactName <> MyUserName Then
     PingDelayEnd = GetTickCount
     CurrentPing = False
     PingTime = (PingDelayEnd - PingDelayStart)
     sTextToSend = "Ping Time: 9[" & PingTime & "ms]"
     sText = ""
     ReceiveNotify = True
     Exit Function
Else
     Exit Function
End If


RE: Doing math in a VB dll by Choli on 08-29-2004 at 09:05 PM

quote:
Originally posted by gone
I try to do math that part just doesn't respond then but if I take the math out it works
could you explaint that a bit more? and if you post the whole code (both ReceiveNotify and ParseCommand functions) it'd be great. We'd be able to help better.
quote:
Originally posted by gone
sTextToSend = "Ping Time: 9[" & PingTime & "ms]"
don't use the  in the string. Instead use the Chr function with the needed code you'll find in the documentation (something like CCColor or similar, i don't remember)
RE: Doing math in a VB dll by RaceProUK on 08-30-2004 at 02:16 PM

nCCColor