Serp
King
- Joined
- Apr 1, 2015
- Messages
- 661
Hey,
how does this command work? From my experience I would say that
creates a table like this: {variable1=2}
But now I want to create a more complex table. The value should also be a table.
So I want something like this:
So how to save this?
I tried:
but it says:
bad argument #2 to 'SetValue' (Must be of type boolean, nil, number, or string)
how does this command work? From my experience I would say that
Code:
Modding.OpenSaveData().SetValue("variable1",2)
creates a table like this: {variable1=2}
But now I want to create a more complex table. The value should also be a table.
So I want something like this:
Code:
table = {}
x = pPlot:GetX()
y = pPlot:GetY()
table["fort"..x.."-"..y] = {Owner="Serp",Timer=5,A=1,B=3,C=4}
So how to save this?
I tried:
Code:
Modding.OpenSaveData().SetValue("fort"..x.."-"..y,{Owner="Serp",Timer=5,A=1,B=3,C=4})
but it says:
bad argument #2 to 'SetValue' (Must be of type boolean, nil, number, or string)