Giving a item in a table a value??

Okay, i’m trying to find out how you can give an item one single value that follows it when it’s exchanged in tables.

I want the item to have one single value and keep it when it changes tables beacuse the table.remove function only works with numbers, and i have many more of those inside my menu as you can see in the add items thing.

So unless you tell me that table.Remove also works with strings, i need to find a way to give an item one id or value following the item.
[LUA]
[FIXED!]
[/LUA]

I just had this problem, with a table that’s indexed with strings you must set the value to nil to remove it.

also

[lua]
– So WorkDays[“Monday”] equals 1 and WorkDays[“Tuesday”] equals 2 and so on
WorkDays = { Monday = 1, Tuesday = 2, Wednessday = 3, Thursday = 4, Friday = 5 }

–So you could do

WorkDays[“Monday”] = nil

– To remove it from the table.
[/lua]

Oh yeah i get your point, to the testing!!

But it would be much easier if Garry made table.Remove handle strings.

====================================================
EDIT:

No problems, this runs fine and therefore i remove my code because one of my friends advise me to do it.

You cannot remove a value on a table but you can overwrite it and make it nil.

Re-opened now all of the images is the weekend icon/icon_sun.

Or more it starts being the hammer all of them and when i change them with the button they is all sun when i go in the menu again.

Making it nil is just removing it…

You’re adding items to the DPanelList that are nil, add them after you create them.

Actually i don’t know why i added those it worked without it, but okay.

WOWOWOW, when i add them in the bottom my panel gets all wired but it does still not work.
so i deleted it.

I think it’s because i need to put the DImage1:SetImage in just before the else as the last one.