1 2 3 4 5 6 7 8 9 10
tTbl = {} for i = 1, 20 do local sName = string.format( "NAME%02d", i ) tTbl[sName] = {1,2} end for i, v in pairs(tTbl) do print( i, v ) end
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
NAME07 table: 0x806f320 NAME06 table: 0x806f2d8 NAME16 table: 0x806ff88 NAME11 table: 0x806f8f8 NAME10 table: 0x806f890 NAME04 table: 0x806f370 NAME14 table: 0x806feb8 NAME08 table: 0x806f7c0 NAME20 table: 0x806fda0 NAME05 table: 0x806eed8 NAME19 table: 0x806fd38 NAME09 table: 0x806f828 NAME01 table: 0x806f5d8 NAME17 table: 0x806f128 NAME13 table: 0x806efa8 NAME02 table: 0x806f3e8 NAME15 table: 0x806ff20 NAME18 table: 0x806fcd0 NAME03 table: 0x806f430 NAME12 table: 0x806ef40