Found myself in another pithole, again…Basically, I have two tables.
local Players {}
Players[001] = { Name="T-Rex", Owner="1" }
local Owners {}
Owners[1] = { Name="Richard", Master="Silly" }
There are many more entries, but the gist is that I list owners by number in the first table because the details in the second table may change. Owner 1 is always Owner 1, but it may be owned by me one day or Sally the next. And it helps in case there are other tables - I only need to rename something once.
Here’s the problem:
-- Variables
playerID = self.id
ownerID = Players[playerID].Owner
-- Commands
print(ownerID)
print(Players[playerID].Owner)
print(Owners[ownerID].Name)
The first two lines work fine (and give the same number, as they should!) But 03 returns nil.
Any ideas? -_-;;;
[import]uid: 41884 topic_id: 13078 reply_id: 313078[/import]
I learned to use them once I found out that table.sort() was ordering things like