Originally Posted by saxitoxin
snip
|
Ok, you messed up with playerFaction thingy... I'll rewrite code the way it should be and post it here a bit later.
Thing is you are dealing with a table, you have to create it step by step, a table within a table within a table.
It normally initialize tables this way:
Lua Code:
local table1 = {
table2 = {
table3 = {
-- other tables
}
}
}
or this way:
Lua Code:
local table1 = {}
table1.table2 = {}
table1.table2.table3 = {}
You can't skip a step and do it like so:
Lua Code:
local table1 = {}
table1.table2.table3 = {}
You'll get an error, cuz table2 doesn't exist, there's no such index. That's what you've done wrong.