Author Topic: table mayhem  (Read 1249 times)

0 Members and 1 Guest are viewing this topic.

Offline pHaTTy

  • Forum Legend
  • ***
  • Posts: 1 916
  • Karma: +5/-1
table mayhem
« 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 :))
Resistance is futile!

PtokaX forum

table mayhem
« on: 11 February, 2004, 02:02:08 »

Offline pHaTTy

  • Forum Legend
  • ***
  • Posts: 1 916
  • Karma: +5/-1
(No subject)
« Reply #1 on: 11 February, 2004, 02:20:13 »
sh*t nm cant have tables as number :((
Resistance is futile!

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #2 on: 11 February, 2004, 11:44:12 »
well you can't have 1 but ["1"] is acceptable.

/NL
//NL

Offline c h i l l a

  • Lord
  • ***
  • Posts: 347
  • Karma: +1/-0
(No subject)
« Reply #3 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.

PtokaX forum

(No subject)
« Reply #3 on: 11 February, 2004, 12:09:25 »