• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Disconnection problem

Status
Not open for further replies.
Level 4
Joined
Sep 4, 2007
Messages
54
Whenever i host my map, sometimes, it will disconnect all if not a few of the players besides myself, I know this is a very weird bug because it will show that the players have left the game at the same time.
I've never come across anything like this before. Is it triggers? actions? or just plain me:witch_doc_sad:? (this never happens on any other maps I host)
 
Level 7
Joined
Nov 12, 2005
Messages
299
What you're experiencing is called a server split.
Basically it happens due to desyncs, when something on one player's PC becomes different from that same thing on the server. This usually happens due to improper GetLocalPlayer() use in a map, but there are a couple other reasons for it to happen.
Since it's your map you should check out your initialization triggers or anything that happens near the start - disable one by one and figure out how which is causing this. Afterwards you can post it here and someone might have an idea on how to fix the problem.
Or just post triggers that use GetLocalPlayer if you have any.
 
Level 6
Joined
Mar 2, 2006
Messages
306
quick check-list for server splits (aka disconnection bug):
  • smart-camera (pan camera as neccessary) - this one is a sure-splitter. never ever use it.
  • Selection - Select MyUnitGroup for MyPlayer (SelectGroupForPlayerBJ) - usually splits. work around it.
  • real-time waits - they don't split instantly, but if there a a lot of them in a laggy game, they will cause a split. polled (= game-time) waits are somewhat more resilient to network problems. use them.

test the map. if it still splits, rename the map to something.mpq and extract war3map.j from within. open the script file and search for GetLocalPlayer being used inside. write down triggers that include it. back in world editor, disable those triggers until you find the bad one and find another way to write it.
 
Level 7
Joined
Nov 12, 2005
Messages
299
It might be possible to change while online, but that's highly unlikely. In addition it can't just so change out of nowhere without the user's knowledge and I'm pretty sure you would have to disconnect at least for a second anyway. Furthermore a server split is a known thing to happen in Warcraft mapping.

And just for the record, the standard people are using ATM is not IPv3, it's IPv4 (but will be changed to IPv6 sooner or later). Also this is called "dynamical IP" and for what's it worth I'm using it ever since I know what internet is - more than 5 years now. Never once did it happen for it to just change.
 
Level 4
Joined
Sep 4, 2007
Messages
54
Sry i havent replied btw, (busy). Anyways im pretty sure i have pan camera, and yes I do have a static IP (if it makes a difference) getlocalplayer I don't think I have. Anyways, I'll take pan camera out and test it a couple hundred times to see if it d/cs ppl again. Hopes up!:grin:
 
Level 6
Joined
Feb 2, 2005
Messages
205
I expierence another type of "desync", if you have alot of actions happen at once, for example killen about 400 Units, it will couse a disconnects for older computers. It could also be caused by bugged wc3optimizer corrupted Trigger, if you have used it. You will need to search for the "bad Trigger" like edge said.
 
Level 7
Joined
Nov 12, 2005
Messages
299
Another thing that can cause a desync are units with high damage or hp (or just about anything set too high).
PolledWaits (game time) cannot do this to my knowledge, at least they aren't riskier than using timers or so. Everything can be bad in high quantities.
Also see if you have some actions that only happen to one player.
 
Level 6
Joined
Mar 2, 2006
Messages
306
Another thing that can cause a desync are units with high damage or hp (or just about anything set too high).
high damage? never heard of it. but high dice count / dice amount, yes there have been some reports although i can not confirm it. keep dice count and number of sides below 8 and you should be fine.

also there were rumors (on thehelper) of zero or negative sight range causing server splits but i think that is just someone guessing...
 
Level 4
Joined
Sep 4, 2007
Messages
54
w/e the case I've checked for these things:

Pan Camera- CHECKED
High Damage- CHECKED
Many Actions at Once- CHECKED
Real Time Wait- CHECKED
GetLocalPlayer- CHECKED

I still don't know.

Additionally: these ocurrences happen usually in 10-15 minutes after game starts. It will kick 1-all players playing. Also, I've checked right after I have a server split and there's no recognizable problem that happened at that moment... or is there?:eekani:
 
Level 4
Joined
Sep 4, 2007
Messages
54
ok umm, that would take maybe a million years... cause this problem happens randomly, maybe 1:3 games it will happen.... even if I did that, i'd still need a big group of people who are willing to play game after game after game just to search for a bug that occurs every once in awhile... :hohum:
 
Level 6
Joined
Mar 2, 2006
Messages
306
well if your map is any good, the worst thing you can do is give up because of a server split. there are always solutions:
  • borrow your friend's computer for a night (and then play a debug version with messages announcing every trigger (except for the simplest ones); also grimoire tool provides a log of all native function calls so you might see what was going on (exit the game right after the split and examine the last several lines of the log)
  • if you have one machine but a good one, try virtual-machine programs...
  • agree on a beta-test-exchange programs with someone (he spends time playing your map with you or with his friends, in return you test his map before big releases)
  • (...more possible but you get the point...)

i know that fixing server-splits is a bitch if you don't have a few devoted friends. the checklist above helped me with most splits (being self-taught, i had quite a few); getting my best friend to give me two hours of his time helped me find them all....
 
Status
Not open for further replies.
Top