Mirage Source

Free ORPG making software.
It is currently Fri Mar 29, 2024 6:42 am

All times are UTC




Post new topic Reply to topic  [ 273 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next
Author Message
 Post subject: IOCP -____-"
PostPosted: Thu Dec 14, 2006 2:01 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 2:11 pm 
Offline
Knowledgeable

Joined: Sun May 28, 2006 9:06 pm
Posts: 147
nope but, what kind of error is it? it would help a lot solving this problem ;)

_________________
There are only 10 types of people in the world. Those who understand binary and those who don't.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 2:43 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 2:48 pm 
Offline
Knowledgeable
User avatar

Joined: Mon Jul 24, 2006 2:04 pm
Posts: 339
dbytes probably has no value - you are probably passing an undimmed byte array in the dbytes byref.

_________________
NetGore Free Open Source MMORPG Maker


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:04 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:06 pm 
Offline
Knowledgeable
User avatar

Joined: Sun May 28, 2006 10:07 pm
Posts: 327
Location: Washington
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:10 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:14 pm 
Offline
Knowledgeable
User avatar

Joined: Sun May 28, 2006 10:07 pm
Posts: 327
Location: Washington
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. :(


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:20 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:26 pm 
Offline
Knowledgeable
User avatar

Joined: Sun May 28, 2006 10:07 pm
Posts: 327
Location: Washington
Is the error something like "Object Variable or With Block Variable Not Set"?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:36 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
I don't remember what the error was. My tester isn't on so I need a subsitute.

:: Pando

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:43 pm 
Offline
Knowledgeable
User avatar

Joined: Sun May 28, 2006 10:07 pm
Posts: 327
Location: Washington
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)
Normal stuff... This part should be working fine.

Pando wrote:
Code:
    If IsConnected(Index) Then
This could be causing an Object Variable or With Block Variable Not Set error if the socket has not been set as a clsSocket object. (If you don't initialize the object, you can't use it.)

Pando wrote:
Code:
        GameServer.Sockets(Index).WriteBytes dbytes
This, too, could cause the Object Variable or With Block Variable Not Set error, if the socket hasn't been initialized.

Pando wrote:
Code:
        DoEvents
    End If
End Sub
Follow your server from initialization, and make sure it's setting your variables to 'New' clsServer and 'New' clsSocket.. (Or whatever you named your class objects..)

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. :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:48 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 4:15 pm 
Offline
Knowledgeable
User avatar

Joined: Sun May 28, 2006 10:07 pm
Posts: 327
Location: Washington
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 15, 2006 1:26 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 15, 2006 2:31 am 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
Was just going to ask what you added afterwards... so it was binary?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 15, 2006 2:51 am 
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.


Top
  
 
 Post subject:
PostPosted: Fri Dec 15, 2006 5:03 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 15, 2006 3:44 pm 
Offline
Knowledgeable
User avatar

Joined: Sun May 28, 2006 10:07 pm
Posts: 327
Location: Washington
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?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 15, 2006 6:14 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 15, 2006 6:45 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
Yep I've got it fixed. Thanks Verrigan for helping though.

:: Pando

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 14, 2007 5:22 am 
Offline
Regular
User avatar

Joined: Sun Aug 27, 2006 5:36 pm
Posts: 53
uhm, sorry for posting in this older thread, but how did u fix it?
im having the same problem :/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 14, 2007 7:06 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
Did you add binary files?

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 14, 2007 11:45 am 
Offline
Regular
User avatar

Joined: Sun Aug 27, 2006 5:36 pm
Posts: 53
jepp


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 14, 2007 11:48 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
classes.dat is blank probally.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 273 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group