|
| 10 Jul 2016 11:41 AM |
I'm using a module Script to store the Initial PlayerProfile, However, The following script does not work:
local DATA={ STARTDATA={} STARTDATA["CURRENCY"]={} STARTDATA["CURRENCY"]["COINS"]=12 STARTDATA["STATISTICS"]={} STARTDATA["STATISTICS"]["PLAYER_KILLS"]=0 STARTDATA["STATISTICS"]["DEATHS"]=0 STARTDATA["STATISTICS"]["RANK"]=1 STARTDATA["SkinData"] = {} STARTDATA["SkinData"]["SLOT_EQUIPED"]=1 } return DATA
"Expect '}' to close '{' at line 1"
I feel as if The reason For it not working is obvious, however, I still don't understand, and require the issue to be explained.
Content Sorcus'd |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2016 11:44 AM |
You need a comma after each entry.
|
|
|
| Report Abuse |
|
|
|
| 10 Jul 2016 12:50 PM |
When I insert a comma after every entry; "Expected a Name, Got a complex expression"
Content Sorcus'd |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 10 Jul 2016 01:02 PM |
| I'd recommend learning about tables first. |
|
|
| Report Abuse |
|
|
pidgey
|
  |
| Joined: 16 Jan 2008 |
| Total Posts: 2739 |
|
|
| 10 Jul 2016 01:59 PM |
local DATA={ STARTDATA={Currency = {Coins, pidgey's}, Statistics = {Kills, Deaths, Rank}} }
why not do that
pidgey is my name sh##posting is my game |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 10 Jul 2016 02:12 PM |
| You need to wrap every key in [] with the commas |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2016 02:19 PM |
It would be nice if someone actually tested the script before posting, And as a matter of fact, I've tested all these "Solutions" Before I even posted. If you Genuinely want to help someone out, Actually test, Rather than biting the barrel for Forum bloody posts.
Content Sorcus'd |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 10 Jul 2016 10:48 PM |
STARTDATA["CURRENCY"]
That's not a key like that. Without the square brackets, you can only have string literals - stuff like words - with no expressions.
If you add the commas like other posters said and wrap every key in the square brackets, you'll fix the issues you're getting (assuming there's no other errors). |
|
|
| Report Abuse |
|
|