Page 1 of 1

[0.16.22] Desync on connect (multiple users experiencing)

Posted: Fri Feb 09, 2018 4:34 am
by Jon8RFC
Multiple users have had problems connecting in the past two hours, to server 176.31.106.185:34199

I connected just fine 4-5 hours ago hours ago.

Desync is too large to attach to the forum:
https://drive.google.com/open?id=1x2oM9 ... jEsX6oXtu0_

Re: [0.16.22] Desync on connect (multiple users experiencing)

Posted: Fri Feb 09, 2018 7:12 am
by Rseding91
Thanks for the report. The desync is being caused by the custom scenario script you're running.

it's adding a GUI element to the player GUI on game load which is invalid and causes desyncs like you're experiencing. I recommend you just delete the scenario script - if you do it will fix the desyncs and everything will work normally.

Additionally the script is bypassing the "you can't change the game/global table in the on_load event" by setting local variables on script init and then running logic in on_tick based off those variables but as you're seeing that's still invalid and causes desyncs.

Mod makers and script makers need to learn: YOU ARE NOT ALLOWED TO CHANGE ANYTHING ON_LOAD, GAME STATE, LOCAL VARIABLES OR OTHERWISE. IT IS INVALID - STOP DOING IT!

Re: [0.16.22] Desync on connect (multiple users experiencing)

Posted: Fri Feb 09, 2018 7:14 am
by Jon8RFC
Ah-ha! Thanks for letting me know. I'll pass the word along.

Re: [0.16.22] Desync on connect (multiple users experiencing)

Posted: Fri Feb 09, 2018 5:35 pm
by Cooldude2606
Any scenario errors should have been passed to me first, sorry if this took up too much of your time.

I was the one who made the custom scenario, and on our server we try to encourage players to tell us about the desyncs first then pass them to you if it is game related.
But a point I would like to make is that I don't add guis on_load in fant the only thing I do (even thou I'm not ment to) is re-link the meta tables, so if there is a point I am missing where I add a gui on_load would you please tell me as that is never ment to happen.
I'm sorry for bypassing the "you can't change the game/global table in the on_load event" I can't find another way to get the same effect due to functions being cleared on_load/save.
context for my on_load

Re: [0.16.22] Desync on connect (multiple users experiencing)

Posted: Fri Feb 09, 2018 8:44 pm
by Rseding91
Addons\Guis\player-list.lua line 45:

Code: Select all

Gui.left.add{...}
Then in on_tick you call Gui.left.update() which executes that function added by loading the script.