Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IOCP -____-"
#1
Does anyone have IOCP and have problems with users connecting? I don't know why this is happening but I keep getting this error when I'm on and another player connects. An error pops up serverside! x____x

:: Pando
Reply
#2
nope but, what kind of error is it? it would help a lot solving this problem Wink
Reply
#3
I think the error was:
Code:
Public Sub WriteBytes(dbytes() As Byte, Optional thenShutdown As Boolean)
  Call mvarSocket.Write(dbytes, thenShutdown)
End Sub

I forgot what it said. It was RTE with alot of numbers and some words.
If you could help test it for me thatd be nice.

:: Pando
Reply
#4
dbytes probably has no value - you are probably passing an undimmed byte array in the dbytes byref.
Reply
#5
Could you help me test the client? I want to see whats the error again and maybe since I just updated my windows xp it might have a different result.

:: Pando
Reply
#6
What do you mean copy and paste all the codes?

HEY wasn't you the one who created the IOCP tutorial?
maybe I should do it over?

;; Pando
Reply
#7
Thats all I could find of WriteBytes besides the sub itself.

Code:
Sub SendDataTo(ByVal Index As Long, ByVal Data As String)
Dim i As Long, n As Long, startc As Long
Dim dbytes() As Byte
    
    dbytes = StrConv(Data, vbFromUnicode)
    If IsConnected(Index) Then
        GameServer.Sockets(Index).WriteBytes dbytes
        DoEvents
    End If
End Sub

If someone could test the client I could tell you what the error was.

:: Pando
Reply
#8
I don't remember what the error was. My tester isn't on so I need a subsitute.

:: Pando
Reply
#9
The tutorial and my server's code is exact and yes its setting,
Code:
Set objNewMember = New clsSocket and

Code:
' Get the listening socket ready to go
    Set GameServer = New clsServer

:: Pando
Reply
#10
The error is Out of Memory, and a bunch of numbers.

this error happens once the user selects a character to play.
to fix it i have to pretty debug and press run again. (Server)

[Edit#2] I just forgot that I didn't edit the max_players for client side. Is that the problem? Hope so.


[Edit#3] OMG! this is driving me crazy! I recoded the source, the first thing i added was IOCP and then tested it. Worked! Then I added other stuff and now I end up with the same error highlighting

Code:
Call mvarSocket.Write(dbytes, thenShutdown)

Error: Out Of Memory
but before I added everything else it didn't say that when my
test logged in.

GARR! WHY! the binary files seem to be the problem I think.

:: Pando
Reply
#11
Was just going to ask what you added afterwards... so it was binary?
Reply
#12
Out of memory.. Do you have enough RAM to run the server? I think that was one of the reasons I used to get the error. That and client side, when I had a crappy video card and was using video memory.
Reply
#13
Yeah it was the binary files (hint: I'm working on a pokemon game and I removed alot of junk and now everythings fixed No armours, classes, weapons, equipment, levels, exp, etc. and you can choose any sprite you desire, PRETTY NEAT HUH) Yeah it was just the classes.dat having no data or saving wrong.

:: Pando
Reply
#14
Pando Wrote:Yeah it was the binary files (hint: I'm working on a pokemon game and I removed alot of junk and now everythings fixed No armours, classes, weapons, equipment, levels, exp, etc. and you can choose any sprite you desire, PRETTY NEAT HUH) Yeah it was just the classes.dat having no data or saving wrong.

:: Pando

lol another pokemon game... well good luck with that
Reply
#15
Yep I've got it fixed. Thanks Verrigan for helping though.

:: Pando
Reply
#16
Did you add binary files?
Reply
#17
classes.dat is blank probally.
Reply
#18
I don't know then. That was my problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)