• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.1 Looping in a SQL table

sircurse

Curseria RTG - TFS 1.1
Joined
Nov 12, 2007
Messages
107
Reaction score
2
Location
Brazil
Twitch
curseofcourse
Hi folks,

I m trying to pass through a SQL table but I m getting the following error:
bad argument #1 to 'next' (table expected, got number)

I have the following script trying to do this looping:
local list = db.storeQuery("SELECT `id`, `owner` FROM `houses` WHERE `owner` != 0 ORDER BY `id` ASC;")

if list ~= -1 then
repeat

.... code .....

until not next(list)

The error shows on the line where I have the "until not next(list)" parameter.
For some reason it is not understand that my "list" are a table.

What am I doing wrong?

Curse.
 
Back
Top