generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Module scripts

Previous Thread :: Next Thread 
xboxvsgunfanboy is not online. xboxvsgunfanboy
Joined: 23 May 2015
Total Posts: 466
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
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
10 Jul 2016 11:44 AM
You need a comma after each entry.


Report Abuse
xboxvsgunfanboy is not online. xboxvsgunfanboy
Joined: 23 May 2015
Total Posts: 466
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 is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
10 Jul 2016 01:02 PM
I'd recommend learning about tables first.
Report Abuse
pidgey is not online. 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 is not online. 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
xboxvsgunfanboy is not online. xboxvsgunfanboy
Joined: 23 May 2015
Total Posts: 466
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image