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