View Issue Details

IDProjectCategoryView StatusLast Update
0008706Multi Theft Auto : San AndreasScriptingpublic2015-01-16 14:42
ReporterBpb_Xommko Assigned Toccw  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Target Version1.4.1Fixed in Version1.4.1 
Summary0008706: Element data desync

When element data is set in onElementDataChange, it wil desync on clients.

Steps To Reproduce

run addEventHandler("onElementDataChange", root, function() setElementData(source,"ng:status", "loaded2test") end)
run setElementData(getPlayerFromName("your_name"), "ng:status", "123")

Now, get this element data on server:
run getElementData(getPlayerFromName("your_name"), "ng:status")
--> Command results: loaded2test [string]

And on clients:
crun getElementData(localPlayer, "ng:status")
--> Command results: 123 [string]

TagsNo tags attached.



2015-01-09 20:43

viewer   ~~0022814

Last edited: 2015-01-09 20:43

It seems that clients receive new data in wrong order. I did some more testing, and noticed that client receives changed data first, then it receives original value.

addEventHandler("onElementDataChange", root,
function (dataName)
outputChatBox("onElementDataChange|server " .. dataName .. ": " .. tostring(getElementData(source, dataName)))

    if dataName == "status" then
        if getElementData(source, dataName) == 1 then
            setElementData(source, "status", 3)

setElementData(player, "status", 1)

onElementDataChange|server status: 1
onElementDataChange|server status: 3
onClientElementDataChange|client status: 3
onClientElementDataChange|client status: 1


2015-01-12 01:22

administrator   ~~0022853

Fixed in

Seems like a simple fix, therefore expect end of world.


2015-01-16 14:42

viewer   ~~0022867

Thanks. It's been for years (first noticed in 1.0.4), and now it has been fixed.

Issue History

Date Modified Username Field Change