#how would I turn (for example) a 1, 9 into 1,2,3,4,5,6,7,8,9?

18 messages · Page 1 of 1 (latest)

plain geyser
#

Im asking this because I dont really the name of a function which does this, any help is appreciated

main plank
#

;compile

for i=1, 9, 1 do
    print(i)
end```
halcyon talonBOT
#
Program Output
1
2
3
4
5
6
7
8
9

plain geyser
#

@main plank is there a way to turn the entire thing into a table?

main plank
#

;compile

local list = {}

for i=1, 9, 1 do
    table.push(list,i)
end
print(list)```
halcyon talonBOT
#
Program Output
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:4: field 'push' is not callable (a nil value)
stack traceback:
prog.lua:4: in main chunk
[C]: in ?

main plank
#

ooo

#

;compile

local list = {}

for i=1, 9, 1 do
    table.insert(list,i)
end
print(list)```
halcyon talonBOT
#
Program Output
table: 0x556a7d70f390

plain geyser
#

ooo

main plank
#

wont show the table

#

;compile

local list = {}

for i=1, 9, 1 do
    table.insert(list,i)
end
print(tostring(list))```
halcyon talonBOT
#
Program Output
table: 0x56541ebf9ee0

main plank
#

idk if this will work

#

nah

plain geyser
#

ill try it

main plank
#

should give you like {1,2,3,4,5,6,7,8,9}

plain geyser