Alias for display()

Post Reply
Tael
Posts: 4
Joined: Wed Apr 29, 2009 1:51 am

Alias for display()

Post by Tael »

This is a problem I've run into a few times now trying to make an alias that refers to variable/table names directly.

Specifically, I'm trying to make an alias ^display (.+)$ that I can use to look at values without having to go in and change a script every time. The issue is that if I just do display(matches[2]), the function gets a string as its argument which isn't particularly helpful.

Is there some function I can use to...untype(?)....the string?

User avatar
Vadi
Posts: 5048
Joined: Sat Mar 14, 2009 3:13 pm

Re: Alias for display()

Post by Vadi »


Tael
Posts: 4
Joined: Wed Apr 29, 2009 1:51 am

Re: Alias for display()

Post by Tael »

I think I grasp that function, though I don't quite understand what e is doing there - it seems to be set and never used for anything.

I'm also not really sure I understand how f becomes f(). If the loadstring doesn't return anything, then it asserts the loadstring to test whether it's empty (Couldn't this just be solved by using + instead of * in the regex? And what does raising an error in Mudlet actually do?). Then there's this f() business that I'm not really grasping.

Post Reply