PtokaX forum

Development Section => Your Developing Problems => Topic started by: pHaTTy on 11 February, 2004, 02:02:08

Title: table mayhem
Post by: pHaTTy on 11 February, 2004, 02:02:08
hmm imagine we have table like

Test = {

1 = {}

}

now to get to one its been pulled from a string, to cut to the chase

if Test.nr then

now nr is a string how to goto the table number not look for a table named nr lol

hope u can help thx :))
Title:
Post by: pHaTTy on 11 February, 2004, 02:20:13
sh*t nm cant have tables as number :((
Title:
Post by: NightLitch on 11 February, 2004, 11:44:12
well you can't have 1 but ["1"] is acceptable.

/NL
Title:
Post by: c h i l l a on 11 February, 2004, 12:09:25
well better you read how to create table but there are many ways.

tinsert is one..

e.g  tinsert(table,pos,what)

or tinsert(table,what)

will insert at end of table

well or table[number]

e.g table[20]

or table[string]

or table.string

many ways.