PtokaX forum

Development Section => Your Developing Problems => Topic started by: pHaTTy on 10 December, 2003, 18:18:54

Title: I have a problem with table
Post by: pHaTTy on 10 December, 2003, 18:18:54
Hi there,,

I have not a clue, if there is a way of removing a name from a table, without using anything such as text files,

or example

List = { "me", "him", "her" }

is a way to remove Him from the table?

thanx in advance

-phatty
Title:
Post by: Guibs on 10 December, 2003, 18:28:00
Hi,,

Yup,, maybe try that kind of syntax,,
----

for j=1,getn(List) do
if "itemtoremove" == rawget(List,j) then
tremove(List,j)
end
end
----
It should work... :)

l8tr, ;)
Title:
Post by: pHaTTy on 10 December, 2003, 18:30:14
yep thx optimus, i just trying to make my knoledge a bit better, thx guibs i try that way, adn thx optimus for coming stright to the rescue :))

EDIT: Hmm post disappeared brrr lol
Title:
Post by: Optimus on 10 December, 2003, 18:38:23
Hi me Thought you didn't need it, me saw Guibs his post Brrr

I'm terible sorry

Shell i post it again :D
Title:
Post by: pHaTTy on 10 December, 2003, 18:38:25
Great thanx guibs works like a charm


function DoChecking()
for a,b in SettingsList do
user = GetItemByName(b)
if user == nil then
for j=1,getn(SettingsList) do
if "itemtoremove" == rawget(SettingsList,j) then
tremove(List,j)
end
end
end
end
end


WOOO

:D:D:D
Title:
Post by: pHaTTy on 10 December, 2003, 18:39:20
QuoteOriginally posted by Optimus
Hi me Thought you didn't need it, me saw Guibs his post Brrr

I'm terible sorry

Shell i post it again :D


lol np :)) thanx anyways tho m8 :))
Title:
Post by: Guibs on 10 December, 2003, 18:42:59
nice one,, happy to see it works,,... & yw, Phatty,, ;)

Optimus,, nice to see you around too,, :)


l8tr, ;)
Title:
Post by: pHaTTy on 10 December, 2003, 18:52:20
(http://members.lycos.co.uk/garfvader/thanksfortheinfo.jpg)