Search found 15 matches

by juraj
Fri Jan 15, 2010 8:36 pm
Forum: Help Forum
Topic: %pop in lua?
Replies: 6
Views: 1751

Re: %pop in lua?

Perfect! Thank you
by juraj
Thu Jan 14, 2010 3:55 am
Forum: Help Forum
Topic: %pop in lua?
Replies: 6
Views: 1751

Re: %pop in lua?

I just made up table.pop as an example. I'm looking for a way to return the first item of an array and then immediately remove it from the array, but I can do it in multiple steps as well.
by juraj
Thu Jan 14, 2010 2:57 am
Forum: Help Forum
Topic: %pop in lua?
Replies: 6
Views: 1751

%pop in lua?

Is there a function similar to zMud's %pop function in Lua. I'd like to do something like: >> queue = {"do this", "do that", "do something else"} >>send(table.pop( queue)) do this >> for i,v in ipairs(queue) do print(i,v) end 1 do that 2 do the other thing I realise that I could do this by removing ...
by juraj
Wed Jan 13, 2010 7:02 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: Flexible offensive aliases
Replies: 24
Views: 8339

Re: Flexible offensive aliases

Thanks!
by juraj
Wed Jan 13, 2010 3:01 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: Flexible offensive aliases
Replies: 24
Views: 8339

Re: Flexible offensive aliases

Could I please get an explanation of the "(matches[3] or t)" part? Does that choose whether or not to use matches[3] based on whether or not it has a value of nil?