Mirage Source http://web.miragesource.net/forums/ |
|
IOCP -____-" http://web.miragesource.net/forums/viewtopic.php?f=201&t=845 |
Page 1 of 11 |
Author: | Tony [ Thu Dec 14, 2006 2:01 pm ] |
Post subject: | IOCP -____-" |
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 |
Author: | Gilgamesch [ Thu Dec 14, 2006 2:11 pm ] |
Post subject: | |
nope but, what kind of error is it? it would help a lot solving this problem |
Author: | Tony [ Thu Dec 14, 2006 2:43 pm ] |
Post subject: | |
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 |
Author: | Spodi [ Thu Dec 14, 2006 2:48 pm ] |
Post subject: | |
dbytes probably has no value - you are probably passing an undimmed byte array in the dbytes byref. |
Author: | Tony [ Thu Dec 14, 2006 3:04 pm ] |
Post subject: | |
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 |
Author: | Verrigan [ Thu Dec 14, 2006 3:06 pm ] |
Post subject: | |
Pando, I think what Spodi said is the most likely problem.. Go through your server source, and copy/paste all your code that calls WriteBytes. |
Author: | Tony [ Thu Dec 14, 2006 3:10 pm ] |
Post subject: | |
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 |
Author: | Verrigan [ Thu Dec 14, 2006 3:14 pm ] |
Post subject: | |
Show us the code in your server source that calls the WriteBytes() procedure in the socket class. Yes, I originally wrote the tutorial.. It has since been changed by many different people to work on many different systems.. But anyway... Show us the code that calls WriteBytes().. (CTRL-F, WriteBytes, ALT-C, Enter) ---- Off Topic ---- I'm beginning to hate the new FireFox.. Why did they have to set 'S' as the History menu? I always use ALT-S to submit my phpbb posts. |
Author: | Tony [ Thu Dec 14, 2006 3:20 pm ] |
Post subject: | |
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 |
Author: | Verrigan [ Thu Dec 14, 2006 3:26 pm ] |
Post subject: | |
Is the error something like "Object Variable or With Block Variable Not Set"? |
Author: | Tony [ Thu Dec 14, 2006 3:36 pm ] |
Post subject: | |
I don't remember what the error was. My tester isn't on so I need a subsitute. :: Pando |
Author: | Verrigan [ Thu Dec 14, 2006 3:43 pm ] |
Post subject: | |
Pando wrote: 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) Pando wrote: Code: If IsConnected(Index) Then Pando wrote: Code: GameServer.Sockets(Index).WriteBytes dbytes Pando wrote: Code: DoEvents End If End Sub I'd guess that somewhere in there, you are forgetting to Set Socket = New clsSocket... or that it's failing with on error resume next, and no handling of the error.. Look at the tutorial, and compare it to your current code, and see if you might have left something important out. |
Author: | Tony [ Thu Dec 14, 2006 3:48 pm ] |
Post subject: | |
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 |
Author: | Verrigan [ Thu Dec 14, 2006 4:15 pm ] |
Post subject: | |
Okay.. Once you find out what the error is, post it here, and if someone hasn't already helped ya, I'll try to help ya some more.. I gotta go to work now. |
Author: | Tony [ Fri Dec 15, 2006 1:26 am ] |
Post subject: | |
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 |
Author: | halla [ Fri Dec 15, 2006 2:31 am ] |
Post subject: | |
Was just going to ask what you added afterwards... so it was binary? |
Author: | Matt [ Fri Dec 15, 2006 2:51 am ] |
Post subject: | |
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. |
Author: | Tony [ Fri Dec 15, 2006 5:03 am ] |
Post subject: | |
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 |
Author: | Verrigan [ Fri Dec 15, 2006 3:44 pm ] |
Post subject: | |
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 So did you get it fixed? |
Author: | halla [ Fri Dec 15, 2006 6:14 pm ] |
Post subject: | |
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 |
Author: | Tony [ Fri Dec 15, 2006 6:45 pm ] |
Post subject: | |
Yep I've got it fixed. Thanks Verrigan for helping though. :: Pando |
Author: | one [ Sun Jan 14, 2007 5:22 am ] |
Post subject: | |
uhm, sorry for posting in this older thread, but how did u fix it? im having the same problem :/ |
Author: | Tony [ Sun Jan 14, 2007 7:06 am ] |
Post subject: | |
Did you add binary files? |
Author: | one [ Sun Jan 14, 2007 11:45 am ] |
Post subject: | |
jepp |
Author: | Tony [ Sun Jan 14, 2007 11:48 am ] |
Post subject: | |
classes.dat is blank probally. |
Page 1 of 11 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |