Closed ndan0 closed 4 years ago
I have no idea what this is reporting. Can you provide a code example, what is happening, and what you expect?
ok so I get player saved data, this is placement data --[[ function remotes.DSPlacement.OnServerInvoke(player) local tycoonObjects = DataStore2("TycoonObjects",player) return tycoonObjects:GetTable({
["-7, 2, 9, 0, 0, -1, 0, 1, 0, 1, 0, 0"] = 1,
[" -7, 2, 1, 0, 0, 1, 0, 1, 0, -1, 0, 0"] = 1,
["-11, 2, 1, 0, 0, 1, 0, 1, 0, -1, 0, 0"] = 1,
["-11, 2, 9, 0, 0, -1, 0, 1, 0, 1, 0, 0"] = 1,
[" 23, 2, -25, -1, 0, 0, 0, 1, 0, 0, 0, -1"] = 6,
})
end ]]
so when the player first join, the above is their data
and then the player will do some thing like placing and deleting
then I save the table when player leave
Now the player rejoined, the player get the data of theirself AND the data for new player.
if I remove the data inside the GetTable, the player gets the data that they owned and not the data they owned AND new player data
Yeah, that's what :GetTable is meant to do. If you don't have any of the keys it has, then it'll add them. Are you sure you didn't just want :Get
instead?
wait, so It's a feature?, does Get work with table?, ok so I am a bit confused there sorry
yup, I will close it
I have the table data that took some default placement for new players, when the new player joins, the game will set up for first time player. but when the player rejoin the game, they got the default table data, and their own table data.