Search found 114 matches
- Thu Nov 24, 2011 6:49 am
- Forum: Help Forum
- Topic: remove multiple values from indexed table
- Replies: 11
- Views: 8750
Re: remove multiple values from indexed table
Try this: function IITable() return setmetatable({ __keyindex = {}, removeall = function(self, value) for k in pairs(self.__keyindex[value]) do if k == "remove" or k == "removeall" or k == "__keyindex" then return false end if type(k) == 'number' then table.remove(self,...
- Wed Oct 12, 2011 8:37 pm
- Forum: Scripts & Packages
- Topic: fg() and bg()
- Replies: 4
- Views: 5294
Re: fg() and bg()
Add this and the same changes for bg().
Re: Minecraft
Bukkit, creative. There are a handful of people that play on it, but it's not very active at the moment. I run it for some friends from IRC, but they tend to get really into it for a day or two and then not play for weeks at a time.
Re: Minecraft
A game doesn't need amazing graphics to be fun.
Re: Minecraft
I changed the port, so it's at aristocracy.dyndns.org:6097 and I don't think it's whitelisted at the moment. You should be able to join.
- Sun Aug 14, 2011 2:19 am
- Forum: Help Forum
- Topic: Table Calling?
- Replies: 7
- Views: 4898
Re: Table Calling?
It will always be in the order as defined in scripts. The phpTable function makes non-numeric keys retain their order.
- Fri Jul 29, 2011 1:57 am
- Forum: Help Forum
- Topic: remove multiple values from indexed table
- Replies: 11
- Views: 8750
Re: remove multiple values from indexed table
Also, if you're not familiar with using metatables, this is a good example of how they can be useful. I recommend looking through it and trying to get a feel for how it works. Basically, It creates a value => keys index, then when you want to remove every instance of a value, all it has to do is che...
- Fri Jul 29, 2011 12:36 am
- Forum: Help Forum
- Topic: remove multiple values from indexed table
- Replies: 11
- Views: 8750
Re: remove multiple values from indexed table
function IITable() return setmetatable({ __keyindex = {}, removeall = function(self, value) for k in pairs(self.__keyindex[value]) do if k == "remove" or k == "removeall" or k == "__keyindex" then return false end self[k] = nil self.__keyindex[value] = nil end end, rem...
- Wed Jul 27, 2011 9:02 pm
- Forum: Help Forum
- Topic: remove multiple values from indexed table
- Replies: 11
- Views: 8750
Re: remove multiple values from indexed table
If using custom functions to remove fields isn't a problem, this will create a table that will allow you to remove all fields with a specific value easily. Well, fields with simple types. Because of the way tables and functions are stored internally, it won't remove identical functions/tables. (Unle...
- Sat Jul 23, 2011 3:09 am
- Forum: Help Forum
- Topic: Complete newbie to mudlet
- Replies: 2
- Views: 2774
Re: Complete newbie to mudlet
When you quit after changing the settings, did you save the profile?