Mirage Source
Public Property Get Item(vntIndexKey As Variant) As clsSocke - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Public Property Get Item(vntIndexKey As Variant) As clsSocke (/showthread.php?tid=1250)



Public Property Get Item(vntIndexKey As Variant) As clsSocke - William - 04-09-2007

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


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - Dragoons Master - 04-09-2007

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.


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - William - 04-09-2007

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.


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - William - 04-09-2007

Subscript out of range 9.


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - William - 04-09-2007

75 is the highest map number that works.. Any ideas?


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - William - 04-09-2007

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!


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - Matt - 04-09-2007

I'd suggest you find the problem instead of having your max players that high.


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - William - 04-09-2007

I cant find the problem. I went through everything I can think of.


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - Robin - 04-09-2007

I'll have a look later for you.

I'm pretty good at finding out bugs like this.


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - William - 04-09-2007

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:


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - Matt - 04-09-2007

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.


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - Robin - 04-09-2007

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.


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - Ambientiger - 05-09-2007

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.


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - William - 05-09-2007

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.


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - William - 05-09-2007

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


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - Matt - 05-09-2007

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


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - William - 05-09-2007

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


Re: Public Property Get Item(vntIndexKey As Variant) As clsSocke - Matt - 05-09-2007

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