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
 

Dictionary script.

Previous Thread :: Next Thread 
xboxvsgunfanboy is not online. xboxvsgunfanboy
Joined: 23 May 2015
Total Posts: 466
18 Apr 2016 12:22 PM
The following should print "24", However, nil is printed, How would I fix this?
InventoryStoreDefault= {

Equiped = {
["Slot2"] = {
["ItemId"] = 6,
["SwingSound"] = "",
["DrawSound"] = "",
["Skin"] = "",
["ItemEffect"] = "",
["ItemEffect2"] = "",
["Dmg"]="",
["AmmThrown"]="",
["FireStrength"]=""
},

["Fire"] = "28",
["Aura"] = "24",
["emblem"] = "29",
["Music"] = "358831828",
["Death"] = "133138245",
["Kill"] = "203218585"
}
}
MassPlayerDataStore= {
InventoryStoreDefault.Equiped

}
print(MassPlayerDataStore["Aura"])


[ Content Sorcus'd ]
Report Abuse
LucasLua is not online. LucasLua
Joined: 18 Jun 2008
Total Posts: 7386
18 Apr 2016 12:30 PM
MassPlayerDataStore= {
InventoryStoreDefault.Equiped

}

This is your problem.

If you want to get Aura out of your "Equiped" table (That's not how you spell equipped by the way), you'd need to do one of these:


The messy way:

print(MassPlayerDataStore[0]["Aura"])

The correct way:

MassPlayerDataStore = InventoryStoreDefault.Equiped
print(MassPlayerDataStore["Aura"])


You've put your reference to the table inside another table, rather than just referring to the table.
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