irc bot code, help!

Hi,

My mate made a bot for irc ages ago and he just sent me the files (im new to vb so not that good). He made it in vb 6 and i have vb 2005 express edition beta 2.0.

when i try and compile it, I get 4 error messages. would anyone be able to tell me what they are and how to fix them so i can compile the bot. Coz it works when compiled in vb 6 but i don't have it. :(

Error 1 / 2 (both in same section bellow) - 'As Any' is not supported in 'Declare' statements.


OptionStrictOff

OptionExplicitOn

FriendClass clsServerData

'these two are to get the time

'UPGRADE_ISSUE: Declaring a parameter 'As Any' is not supported. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm?keyword="FAE78A8D-8978-4FD4-8208-5B7324A8F795"'

'UPGRADE_ISSUE: Declaring a parameter 'As Any' is not supported. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm?keyword="FAE78A8D-8978-4FD4-8208-5B7324A8F795"'

PrivateDeclareSub CopyMemoryLib"kernel32"Alias"RtlMoveMemory"(ByRef DestinationAs Any,ByRef SourceAs Any,ByVal LengthAsInteger)

PrivateDeclareFunction ConvTimeLib"/FooDll.dll" (ByVal fooAsSingle)AsShort

'player data

PrivateStructure tPlayer

Dim iNumberAsShort

Dim sNameAsString

Dim iScoreAsShort

Dim iTimeAsShort

EndStructure


Error 3 - Overload resolution failed because no accessible 'GetData' accepts this number of arguments.


'we got something! what is it?

PrivateSub wsSock_DataArrival(ByVal eventSenderAs System.Object,ByVal eventArgsAs AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent)Handles wsSock.DataArrival

Dim data, replyTypeAsString

Dim spl()AsString

'Error bellow needs fixing. can't compile.

wsSock.GetData(data, VariantType.String)

'removes xffxffxffxff

data = VB.Right(data, Len(data) - 4)

'check for m or D

replyType = VB.Left(data, 1)

'strip it

data = VB.Right(data, Len(data) - 1)

If replyType ="D"Then

'playerdata

clsData.setPlayerData(data)

gotPlayer =True

ElseIf replyType ="m"Then

'hl1 server data

clsData.setServerData(data)

gotServer =True

EndIf

EndSub

Error 4 - 'Public Event Load(sender As Object, e As System.EventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.


'****************

'Startup ***

PrivateSub frmBot_Load(ByVal eventSenderAs System.Object,ByVal eventArgsAs System.EventArgs)HandlesMyBase.Load

Randomize()

setNextRandom()

autoresponses =False

connected =False

fishChance = 0.9

buildFishList()

'UPGRADE_ISSUE: Load statement is not supported. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm?keyword="B530EFF2-3132-48F8-B8BC-D88AF543D321"'

Load(frmServer)

isOp =False

isAuthed =False

gotOwner =False

comeBack =False

EndSub

[10658 byte] By [HypeH] at [2007-12-16]
# 1

Here's the problem:

You will need to add a COM Component which is Microsoft WinSock Control to your form

To add this control , Click on the Toolbox in the Form Design the right click any tab then click Choose Items...

select the COM tab then Microsoft Winsock

click OK

then add it to the Form and name it according to your code (which calls GetData)

Hope this can help!

Best Regards,

Amr Ouf

AmrOuf at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...