TRIGGER:
^You have successfully inscribed the image of the (.+) on your Tarot card.$
ACTION:
expandAlias("pp")
send("ind card")
jestah("Inscribed "..matches[2])
FUNCTION:
function jestah(announce)
cecho("\n<pink>[Jester]: <sky_blue>"..announce)
end
ERROR:
[ERROR:] object:<Card Inscribed> function:<Trigger1621>
<[string "function Trigger1621()..."]:4: attempt to concatenate a nil value>
What do you see with display(matches)?
I don't know about the trigger match, Ive never inscribed a card, but recreating your script feeding the Trigger copied from your perlregex just works.
What version of mudlet are you running? The reason I ask is your example should work. You should be able to concatenate right off of matches[2] and I am also not able to do so, which I am running version 2.0+. While testing I did find that when you concatenate the matches inside a function it works, but concatenating two variables and one being matches it breaks, but putting the matches[2] into a variable before concatenating works.
The problem was that the matches table gets overwritten any time a trigger or alias fires. Usually that doesn't happen in the middle of a running script, but it will if you explicitly fire an alias or trigger with expandAlias or feedTriggers. So your matches[2], which originally contained the name of your tarot card, became nil after your expandAlias("pp"), since in the "pp" alias, matches[2] is nil.
That's one of the hidden issues with using expandAlias.