Search found 114 matches

by Denarii
Thu Nov 24, 2011 6:49 am
Forum: Help Forum
Topic: remove multiple values from indexed table
Replies: 11
Views: 8719

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,...
by Denarii
Wed Oct 12, 2011 8:37 pm
Forum: Scripts & Packages
Topic: fg() and bg()
Replies: 4
Views: 5287

Re: fg() and bg()

Add this and the same changes for bg().
by Denarii
Wed Oct 12, 2011 3:52 pm
Forum: Whatever
Topic: Minecraft
Replies: 13
Views: 12555

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.
by Denarii
Wed Oct 12, 2011 5:12 am
Forum: Whatever
Topic: Minecraft
Replies: 13
Views: 12555

Re: Minecraft

A game doesn't need amazing graphics to be fun.
by Denarii
Wed Oct 12, 2011 4:41 am
Forum: Whatever
Topic: Minecraft
Replies: 13
Views: 12555

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.
by Denarii
Sun Aug 14, 2011 2:19 am
Forum: Help Forum
Topic: Table Calling?
Replies: 7
Views: 4887

Re: Table Calling?

It will always be in the order as defined in scripts. The phpTable function makes non-numeric keys retain their order.
by Denarii
Fri Jul 29, 2011 1:57 am
Forum: Help Forum
Topic: remove multiple values from indexed table
Replies: 11
Views: 8719

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...
by Denarii
Fri Jul 29, 2011 12:36 am
Forum: Help Forum
Topic: remove multiple values from indexed table
Replies: 11
Views: 8719

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...
by Denarii
Wed Jul 27, 2011 9:02 pm
Forum: Help Forum
Topic: remove multiple values from indexed table
Replies: 11
Views: 8719

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...
by Denarii
Sat Jul 23, 2011 3:09 am
Forum: Help Forum
Topic: Complete newbie to mudlet
Replies: 2
Views: 2767

Re: Complete newbie to mudlet

When you quit after changing the settings, did you save the profile?