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

Players have different meanings in variables. How do I sync?

Status
Not open for further replies.
Level 6
Joined
Apr 5, 2020
Messages
36
Hey. I am creating a Save / Load system without using these commands (automatic loading of the save). I have a problem.

It so happens that when I make a preload for the players, after decrypting the code, each player gets his own values.

I tested with a friend. In my save the parameter "level" is equal to 123, in his save 55.

When the level is displayed on the screen, I see:
My level: 123
His level: 1
Third player: 1
Fourth: 1

And he has:
My level: 1
His level: 55.
Third player: 1
Fourth: 1

Desired result (for both):
My level: 123
His level: 55.
Third player: 1
Fourth: 1

How can this be fixed? Synchronization? If synchronization, how to do it?

Screenshot 1. Save code. During the download process, we change the name of the 15th player to a code in order to use it in the future.
Screenshot 2. This is what the file looks like inside
Screenshot 3. Preloader and running the function to decrypt the string
Screenshot 4. Here we get the code for further decryption.
Screenshot 5. Player 1
Screenshot 5. Player 2
 

Attachments

  • 1.png
    1.png
    11.6 KB · Views: 22
  • 2.png
    2.png
    8.5 KB · Views: 21
  • 3.png
    3.png
    8 KB · Views: 28
  • 4.png
    4.png
    20.7 KB · Views: 21
  • 456456.png
    456456.png
    721.1 KB · Views: 23
  • unknown.png
    unknown.png
    719 KB · Views: 20

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
In case people come across this. I suspect the issue is due to a lack of synchronization of loaded data. Chat based save/load systems force synchronization implicitly with the chat event. However file based systems need to explicitly synchronize the result after loading. This is usually done using the recently added synchronization natives which have optimum synchronization performance. In legacy versions it was done using player selection events to synchronize binary coded data.
 
Status
Not open for further replies.
Top