Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Public Property Get Item(vntIndexKey As Variant) As clsSocke
#1
This is added with IOCP. First of all, I never used Propert, so I dont really know what that is. IOCP works for me, but this code errors when I logout when Im on map 292. And then login again. The same happens with map 292-300. Probably happens with more maps, havnt tested any more. But it works for map 1-18 so far..

Code:
Public Property Get Item(vntIndexKey As Variant) As clsSocket
  Set Item = mCol(vntIndexKey)
End Property
I dont know how to fix this one. I dont even know what it does really xD

And yes, I have MAX_MAPS = 300 on both sides..
Reply
#2
I don't think you folowed Verrigan's tutorial line by line... You need to set something over there to a collection, or something like this.
Reply
#3
Im pretty sure I did:
[Image: classvf1.png]
And since it works for maps 1-18 so far, I dont think the problem is anything like that.
Reply
#4
Subscript out of range 9.
Reply
#5
75 is the highest map number that works.. Any ideas?
Reply
#6
Im proud to say that I wasn't the one programming wrong, it was Verrigan :p Sorry verr, but its true.

I checked all numbers in my source that related to 75. And noticed my MAX_PLAYERS = 75. Now, in his tutorial he told us to change MAX_PLAYERS = 70 to MAX_PLAYERS = 500. And I bet many of you did who added this, since you just want more loops to run in your ms and think it will be able to carry that many players. And Im pretty sure thats why you guys havnt found it yet. But I changed it to 75. Therefore only 75 maps worked, and therefore I noticed it.

So for some reason, the MAX_PLAYERS is related to the maps when IOCP is added, dunno how or why. But I will keep my MAX_PLAYERS at 310 now, since I have 300 maps I will edit, and want to be on the safe side.

PROBLEM SOLVED!
Reply
#7
I'd suggest you find the problem instead of having your max players that high.
Reply
#8
I cant find the problem. I went through everything I can think of.
Reply
#9
I'll have a look later for you.

I'm pretty good at finding out bugs like this.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#10
Robin Wrote:I'll have a look later for you.

I'm pretty good at finding out bugs like this.
This bug doesn't seem possible to find xD And who told you I was sending my server code to you :roll:
Reply
#11
If you don't want it fixed and want your game coded wrong, then don't send it to him. Robin would never steal code from your game.

I don't know why he's even offering to help you.

Guess it's cause he's too NICE.
Reply
#12
William Wrote:
Robin Wrote:I'll have a look later for you.

I'm pretty good at finding out bugs like this.
This bug doesn't seem possible to find xD And who told you I was sending my server code to you :roll:

No one. Including you.

I offered to help, no need to shove it back in my face.

I do have your client source code after all.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#13
I'm not sure if this is related to the problem your having but it may be useful to you;

While I was adding IOCP to Cerberus I came across a similar problem whereby after closing the client (Game or Dev) I couldn't reconnect to the server again, I don't remember what the map numbers were so I can't say if it was related to the amout of MAX players. Although I know I set it to around 5 or 10 just to cut down on the server loops.

Suffice to say I was a bit miffed about it and checked over the code and the COMSocketServer.dll I was using time and time again! As luck would have it, I had anti-spyware software running at the time and decided to check the connections analysis on what was going on when the clients connected/disconnected.
I found that when the client disconnected the server was leaving the address/port in a 'Passive close' state (now this is where I'm gonna get a bit vague I'm afraid as I don't remember what I did to fix it) and wouldn't let the client reconnect. I'm fairly sure it was something to do with the way one of the subs closes the socket either after writing data or shutting it down.
I've checked over my code against the copy of verrigans tutorial I've got but can't find any differences in the code. Sad
All I know is that now when a client disconnects from my server it leaves the address/port in an 'Active Close' state and I can reconnect regardless of map number and MAX player settings. ( I checked this a minute ago, logged out and in again on map 25 with MAX players set to 10).

Couple of ideas:
1. I keep coming back to my - Sub AlertMsg() - where I've used - .ShutdDown(ShutDownWrite) - and not (ShutDownBoth) but I don't think this is it. Sad
2. I think you've added extra Buffers to your code, might I be so bold as to suggest you check through the code you've added there?? :|
That's about all I can think of right now, sorry I'm tired, hope it's of some use and good luck.
Reply
#14
Robin Wrote:
William Wrote:
Robin Wrote:I'll have a look later for you.

I'm pretty good at finding out bugs like this.
This bug doesn't seem possible to find xD And who told you I was sending my server code to you :roll:

No one. Including you.

I offered to help, no need to shove it back in my face.

I do have your client source code after all.

LOL, wtf are you talking about.. I wrote:
Quote:And who told you I was sending my server code to you
Cause I sent you the source before, and was JOKING. God, you really need to know when people are joking.
Reply
#15
But I had the roll eyes xD :roll:

Well it was a joke since I already sent him the source a week ago or so xD
Reply
#16
William Wrote:
Robin Wrote:
William Wrote:
Robin Wrote:I'll have a look later for you.

I'm pretty good at finding out bugs like this.
This bug doesn't seem possible to find xD And who told you I was sending my server code to you :roll:

No one. Including you.

I offered to help, no need to shove it back in my face.

I do have your client source code after all.

LOL, wtf are you talking about.. I wrote:
Quote:And who told you I was sending my server code to you
Cause I sent you the source before, and was JOKING. God, you really need to know when people are joking.

I agree with Dave. I too didn't know this was a joke.

The rolling eyes don't mean it's a joke. The Tongue face does. Tongue
Reply
#17
Well some people tend to take this face as a surprised =/ When its actually close to this xD

And some people dont know what this is a happy face Tongue
Reply
#18
It's a face sticking it's tongue out at you. If you don't wanna use that one, then just do =P

We all know what that is. Tongue
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)