Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why dose this error? Tables

Asked by
RM0d 305 Moderation Voter
10 years ago

BodyPackages ={ Combine = {["ModelName"]="" , ["Description"]="", ["Price"]=""}, HevSuit = {["ModelName"]="" , ["Description"]="", ["Price"]=""}, Everyday_Blue = {["Everyday_Blue "]="" , ["Description"]="", ["Price"]=""}, } print(BodyPackages [1]) -- It sould print table: (TableData) it just prints nil

1 answer

Log in to vote
0
Answered by
ipiano 120
10 years ago

You don't need to assign the inner tables to variables; it should just be

BodyPackages ={
{["ModelName"]="" , ["Description"]="", ["Price"]=""},
{["ModelName"]="" , ["Description"]="", ["Price"]=""},
{["Everyday_Blue "]="" , ["Description"]="", ["Price"]=""},
}

If you want to have the original variables still usable do it like this

Combine = {["ModelName"]="" , ["Description"]="", ["Price"]=""} HevSuit = {["ModelName"]="" , ["Description"]="", ["Price"]=""} Everyday_Blue = {["Everyday_Blue "]="" , ["Description"]="", ["Price"]=""}

BodyPackages={Combine,HevSuit,Everyday_Blue}

0
is there a way RM0d 305 — 10y
0
A way to what? Still have the variables? ipiano 120 — 10y
Ad

Answer this question