Query Table.

Wondering if anyone can give me a few pointer on creating a list that can be queried.

You mean a table?

If so: http://wiki.garrysmod.com/?title=Tables

Sorry, but what?

Do you mean this?:
[lua]ExampleTable = { “string”, “string2” }
for k, v in pairs( ExampleTable ) do
Should print something like:

0     string
1     string2

No, The table its self is permanent but the data is temporary.

What are you talking about?

What I can guess is he means a permanent table, but data can be added and removed, which is a table, so I really don’t know what he’s getting at

Ah, he should use GLON then. Something like this would work:


function SaveTable(savename, table)
file.Write(savename, glon.encode(table))

function LoadTable(loadname)
return glon.decode(file.Read(loadname))

local MyTable = {“Value1”, 1424, “Blah”}
SaveTable(“MyTable.txt”, MyTable)

OtherTable = LoadTable(“MyTable.txt”)

Something like that.

In theory that should work, but let’s see


Also, I’ve been seeing a lot of you recently iRzilla, I thought you’d be over at darklands.

Banned ;O

D’awwwwwww but you were awesome back there

Don’t worry, I’ll kill dark.

Queries? Your safest bet is the sql library :

Since that’s what sql is all about.

Or you could create a bunch of functions to replicate that functionality with normal tables.

Join the club of banned aimbotters.