HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Desync Question

12-01-2008, 10:55 PM#1
Beardo
Would this cause a desync?

Collapse JASS:
call DisplayTimedTextToForce(GetPlayersAll(), 15, "You will now gain 30 mana per second as long as you control" + GetUnitName(summonbldg[GetPlayerId(GetLocalPlayer())]))

Thanks
12-01-2008, 11:56 PM#2
Ammorth
maybe, and its not cause of the function. Its cause of the string tables.

to be safe, I would do:
Collapse JASS:
local string s
local integer i = 0
loop
    exitwhen i > 11
    set s = "You will now gain 30 mana per second as long as you control" + GetUnitName(summonbldg[GetPlayerId(Player(i))])
    set i = i + 1
endloop
atleast once when the units are within the array. This guarantees that the strings exist the same for each player and that the string table stays in sync (whether is causes desyncs, I don't know, but better be safe than sorry).