• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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: 18
  • 2.png
    2.png
    8.5 KB · Views: 18
  • 3.png
    3.png
    8 KB · Views: 25
  • 4.png
    4.png
    20.7 KB · Views: 18
  • 456456.png
    456456.png
    721.1 KB · Views: 20
  • unknown.png
    unknown.png
    719 KB · Views: 16

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
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