# repeat alias

Share your scripts and packages with other Mudlet users.
Jor'Mox
Posts: 1084
Joined: Wed Apr 03, 2013 2:19 am

Re: # repeat alias

Post by Jor'Mox » Sat Feb 24, 2018 1:47 pm

I think you have it right, the matches table is overwritten when a new alias is called, so you need to save the relevant values before you call expandAlias.

User avatar
ulysses
Posts: 42
Joined: Fri Jan 05, 2018 7:43 pm

Re: # repeat alias

Post by ulysses » Sat Feb 24, 2018 3:33 pm

I fixed this my making matches local like this:

Code: Select all

local myMatches = matches
for i = 1, tonumber(myMatches[2]) do
	expandAlias(myMatches[3])
end
Perhaps this could be put in the package above at the start of this thread?

Thanks!
U
Wod :mrgreen:
CthulhuMUD
www.cthulhumud.com
A hugely entertaining MUD based on the horror writings of HP Lovecraft.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest