Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,561 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
num_clients and on_server bug #372835
06/04/11 20:16
06/04/11 20:16
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline OP
Expert
William  Offline OP
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
I am using A8.03 and when a client joins a game the on_server function will sometimes trigger twice. The num_clients also goes up by 2 when it should only be going up by one.

When this client leaves, the num_clients just goes down by one.

Everything else seems to work fine. I am only calling session_connect once. As you can imagine, the num_clients builds up to large amounts over time.

Re: num_clients and on_server bug [Re: William] #372838
06/04/11 20:35
06/04/11 20:35
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
I've had similar problems with A7.77 about two years ago.
http://www.opserver.de/ubb7/ubbthreads.p...true#Post283870

The first bug (1.) that happened when clients were dropped due to bad connections was apparent fixed.

The bug I mentioned in my last post looks similar to your problem, but it doesn't seem to be the exactly the same.
I don't think there has been a major project which has been using the internal multiplayer ever since, so there's a chance our two bugs have a similar cause.
It was the reason for me to switch to Anet however.

Last edited by SchokoKeks; 06/04/11 20:39.
Re: num_clients and on_server bug [Re: SchokoKeks] #372846
06/04/11 22:03
06/04/11 22:03
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline OP
Expert
William  Offline OP
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Perhaps they are connected. However, in my case they never trigger a leave twice. Just the on_server event_join is triggered twice randomly. So I could end up "2" or much more in the num_clients feild once everyone leaves but the server.

It also only seems to happen if I join a game, then leave it, and join it again. Doesn't ever seem to happen on the initial join sequence.

Re: num_clients and on_server bug [Re: William] #372947
06/06/11 01:49
06/06/11 01:49
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline OP
Expert
William  Offline OP
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
I'm using a solid workaround in the meantime. In the on_server function, I just take the id of the incoming client, and place it in one of 12 variables. Then I check when more clients join to make sure that it only writes into one variable, and it hasn't already be recorded. Then I take this number as the real amount of clients. It works really well.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: num_clients and on_server bug [Re: William] #372961
06/06/11 07:53
06/06/11 07:53
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
I confirm this bug. It can happen when clients connect and disconnect several times. This will be fixed in the next update.


Moderated by  jcl, Nems, Spirit, Tobias 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1