Quote:
Note: Putting the whole thing, if there is more than once ANSI code, into $ansi2mirc returns an error, so that's not a possibility.

I'll take a guess here but try this:
Code:
//var %a = You see exits leading northeast, south, and northwest. | echo -a $ansi2mirc(%a)
The reason that it errors could be the commas in the string. Commas are used for separating parameters in identifiers: if put directly in $ansi2mirc() mirc thinks you're passing more than one parameters to it, so it errors.