• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Lua] [Solved] desync with transpiled lua code

Hello hive, I am experiencing desyncs with the attached map. Since its transpiled from jass I have also attached the map script as a separate file.

To reproduce the desync, start a game with 2 players and 10 computers, then wait. edit: Please re-download the map and script I forgot something.
 

Attachments

Last edited:
Solved; the issue was that I was initializing a location variable and a hashtable variable outside of any scope. This is an issue even if you re-assign the variable to a new object later. In simpler terms, be sure to initialize locations and hashtables in in init function and leave the global variable or static struct member declarations of those variables uninitialized.
 
Known causes of desync - in-depth analysis
replacing the following: DDLib__TempLoc = Location(0., 0.)
with this: DDLib__TempLoc = DDLib__TempLoc or Location(0., 0.) - strangely enough - has the same fixing properties...

@KitsuneTailsPrower I hope you paid attention to this:
Lua:
function InitCustomTriggers()
  InitTrig_Melee_Initialization()
  --Function not found: call InitTrig_Shimmering_Portal()
  --Function not found: call InitTrig_DD_Library()
  --Function not found: call InitTrig_TimerUtils()
end

Offtopic but what God forsaken converter did you use? Why are these numbers and not FourCC?
BlzCreateUnitWithSkin(p, 1852666999, 9531.4, 5698.9, 145.936, 1852666999)
 
Back
Top