- Joined
- Apr 19, 2011
- Messages
- 1,331
In my map, there can be desyncs at start.
So, i want to know what can cause them.
What can cause desyncs ?
So, i want to know what can cause them.
What can cause desyncs ?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
And I guessed that it lies inside the triggers run. You have not posted the triggers' actions. A rough overview did not reveal a problem to me here so far.
Directly after map has finished loading some peoples can be disconnected.
Map initialisation

Evénements


Map initialization

Conditions

Actions


Quête - Create a Requis quest titled Crédits with the description Map crée et édit..., using icon path ReplaceableTextures\CommandButtons\BTNChestOfGold.blp


Quête - Create a Requis quest titled Modes with the description -om (only mid) /// ..., using icon path ReplaceableTextures\CommandButtons\BTNCOP.blp


Quête - Create a Requis quest titled Commandes with the description -repick /// -sh ///..., using icon path ReplaceableTextures\CommandButtons\BTNCOP.blp


Quête - Create a Optionnel quest titled Avis des Joueurs with the description Tirlititi a dit : ..., using icon path ReplaceableTextures\CommandButtons\BTNSelectHeroOn.blp


Quête - Create a Optionnel quest titled Commandes automatis... with the description -ms : -ams et -desa..., using icon path ReplaceableTextures\CommandButtons\BTNCOP.blp


Partie Mêlée - Limit Heroes to 1 per Hero-type (for all players)


Groupe joueur - Pick every player in (All players) and do (Actions)



Boucle - Actions




Joueur - Set (Picked player) Or actuel to 850


Unité - Make Tower 1 0015 <gen> Invulnérable


Unité - Make Tower 1 0014 <gen> Invulnérable


Unité - Make Tower 1 0016 <gen> Invulnérable


Unité - Make Tower 0 0038 <gen> Invulnérable


Unité - Make Tower 0 0006 <gen> Invulnérable


Unité - Make Tower 0 0039 <gen> Invulnérable


Unité - Make Château 0012 <gen> Invulnérable


Unité - Make Tower 1 0018 <gen> Invulnérable


Unité - Make Tower 1 0019 <gen> Invulnérable


Unité - Make Tower 1 0017 <gen> Invulnérable


Unité - Make Tower 0 0041 <gen> Invulnérable


Unité - Make Tower 0 0040 <gen> Invulnérable


Unité - Make Tower 0 0042 <gen> Invulnérable


Unité - Make Forteresse 0013 <gen> Invulnérable


Joueur - Set name of Neutre Hostile to Neutre Hostile


For each (Integer A) from 1 to 16, do (Actions)



Boucle - Actions




Joueur - Turn Donner récompense On for (Player((Integer A)))




Groupe joueur - Add (Player((Integer A))) to StreakPGroup_Display




Set BaseName[(Integer A)] = (Name of (Player((Integer A))))


Set Colour[1] = |cffff0303


Set Colour[2] = |cff0042ff


Set Colour[3] = |cff1ce6b9


Set Colour[4] = |cff540081


Set Colour[5] = |cfffffc01


Set Colour[6] = |cfffeba0e


Set Colour[7] = |cff20c000


Set Colour[8] = |cffe55bb0


Set Colour[9] = |cff959697


Set Colour[10] = |cff7ebff1


Set Colour[11] = |cff106246


Set Colour[12] = |CFF4A2800


Set Colour[13] = |cFF5A5A5A


Set Couleur_txt[1] = red


Set Couleur_txt[2] = blue


Set Couleur_txt[3] = teal


Set Couleur_txt[4] = purple


Set Couleur_txt[5] = yellow


Set Couleur_txt[6] = orange


Set Couleur_txt[7] = green


Set Couleur_txt[8] = pink


Set Couleur_txt[9] = grey


Set Couleur_txt[10] = lightblue


Set Couleur_txt[11] = darkgreen


Set Couleur_txt[12] = brown


Visibilité - Create an initially Activé visibility modifier for Joueur 1 (Rouge) emitting Visibilité across Base T1 <gen>


Visibilité - Create an initially Activé visibility modifier for Joueur 7 (Vert) emitting Visibilité across Base T2 <gen>


Joueur - Masquer Joueur 1 (Rouge) in the post-game score screen


Joueur - Masquer Joueur 7 (Vert) in the post-game score screen
Time Seconds

Evénements


Temps - Every 1.00 seconds of game time

Conditions

Actions


Set Seconds = (Seconds + 1)


Groupe joueur - Pick every player in (All players) and do (Actions)



Boucle - Actions




Joueur - Set (Picked player) Nourriture utilisée to Seconds
OneSec Elapsed GT

Evénements


Temps - Elapsed game time is 1.00 seconds

Conditions

Actions


Groupe joueur - Pick every player in (All players) and do (Actions)



Boucle - Actions




Unité - Create 1 Nothing for (Picked player) at (Center of nothing region <gen>) facing Orientation bâtiment par défaut degrees


Destructible - Pick every destructible in (Entire map) and do (Actions)



Boucle - Actions




Déclencheur - Add to Respawn Tree <gen> the event (Destructible - (Picked destructible) dies)
function SetUnitXY takes unit u, real x, real y returns nothing
call SetUnitX(u, x)
call SetUnitY(u, y)
endfunction
function SetUnitXY takes unit u, real x, real y returns nothing
call SetUnitX(u, x)
call SetUnitY(u, y)
endfunction
Actions
Groupe joueur - Pick every player in (All players) and do (Actions)
Boucle - Actions
Unité - Create 1 Nothing for (Picked player) at (Center of nothing region <gen>) facing Orientation bâtiment par défaut degrees
Invalid integers cause crashes when saving
Invalid integer values, for example rawcodes, can cause a crash upon saving the map in the WE. 'ÆØpo' would for example cause a crash a neither 'Æ' nor 'Ø' is an accepted value.
Groupe joueur - Pick every player in (All players) and do (Actions)
Boucle - Actions
Try to deactivate all your triggers and test your map.
If desync still happens:
- try resetting the tileset and test again ... sometimes tiles can be corrupt when using newgen or WEU (happened to me once)
- check object editor for extreme values ... extreme values like 1000000000 life for a unit or extreme regeneration/damage were reported to desync at certain circumstances
- do you use hostbots? try hosting without
- remove all imported data and test again; sometimes models/sounds/etc. can cause crit errors (which are often mistaken for desyncs)
If desync doesnt happen:
- check for dangerous actions in triggers: Pan Camera as Necessary, Getting the player slot state at map init (can cause desync!), etc.
also, check the defail JASS action for :
because every actions inside are GetLocalPlayer().
Groupe joueur - Pick every player in (All players) and do (Actions)
Boucle - Actions
and desync usually happen when something done inside GetLocalPlayer().
is that gui function the ForForce() function in jass? i think i tested this function if it is doing things only for local players, and it didnt
but i tested it useing Player(15) .. neutral player .. i put a display to all text in there and i saw it
oh i remember even testing with several computer players, i also saw multiply msgs for each computer then
is it desyncing in battle net?!?! that would be fatal for me^^
actually, I don't understand why the code above cause desync.Second, creating handles is not the only thing that can/will cause a desync. Lets see if I remember them all :
1. Creating or destroying a handle
2. Use a string for the first time
3. Change the game in any way that affects gameplay (eg, change the move speed of a unit).
4. Assign a new random seed.
5. Pretty much anything that have an effect that you can read later.
6. TriggerSleepAction
Not all of the causes desyncs directly. For example the following code wont desync until the second if:
JASS:set udg_Integer = 1 if Player(0) == GetLocalPlayer() then set udg_Integer = 2 endif call TriggerSleepAction(5) // wait 5 seconds if udg_Integer == 2 then call CreateTimer() endif
actually, I don't understand why the code above cause desync.
since you use difference language, try avoid special character ?
if( GetLocalPlayer() == Player(0) ) then
call SetTextTagVisibility( texttag , true )
endif
if( GetLocalPlayer() != Player(0) ) then
call SetTextTagVisibility( texttag , false )
endif
if( GetLocalPlayer() == Player(0) ) then
call SetTextTagVisibility( texttag , true )
endif
call TriggerSleepAction(1)
if( GetLocalPlayer() != Player(0) ) then
call SetTextTagVisibility( texttag , false )
endif
TriggerSyncReady will fix this ;D
