I've decided to try making my combat system using a multi-dimensional table, but I'm having some trouble: The indices of the tables (excluding the last one in the stack) are no longer numerical, and I'm therefore unable to work with them as I normally do. I went around this by ending each table's name with a number, then using tonumber(string.sub(tableName, endofTableName)). However, this doesn't help me when I'm attempting to find the length of the table, because #Table simply values at 0. Any ideas on how to fix this? Thanks a ton! :) --EDIT-- To clear up the question a bit, since it's pretty hard to understand, let me give an example;
Attack = {
Combo = {
Pose1 = {
1, 2, 3
},
Pose2 = {
1, 2, 3
}
}
}
How would you find the length of the table Combo? #Attack.Combo wouldn't work, as that would simply return 0. Sorry about the question being hard to understand, I often have a hard time explaining myself.

1 comment
Editing ;)