|
| 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
|
  |
| 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 |
|