Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Sloppy
Newbie


Joined: 06 Dec 2002
Posts: 5
Location: USA

PostPosted: Fri Dec 06, 2002 9:04 pm   

multi line alias?
 
Okay. I prolly don't need an alias to do the following. But that is how I would have done it in my last frontend. So here's the problem.

I want to enter a line with more than one word and get different results back depending on what words follow the first one.

For instance:

Entering from the command line:

ttask xxxx

would return a different result than

ttask

or even

ttask xxxx yyyy zzzz


Thanks
Reply with quote
Sloppy
Newbie


Joined: 06 Dec 2002
Posts: 5
Location: USA

PostPosted: Fri Dec 06, 2002 9:05 pm   
 
Sorry for the multiple posts. That's a bug. Please delete the other two.

Thanks
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Fri Dec 06, 2002 9:32 pm   
 
Delete them yourself. If you go view them, you'll see a trash can icon at the top. Click it.

You can delete or edit your posts!



AzCowboy
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Dec 06, 2002 11:08 pm   
 
Actually, if you want to input that you're better off with an alias. You can then put some nested #IF commands in there to check the null status of each argument:

#if (%null(%1)) {#noop this is for an alias with no arguments} {#if (%null(%2)) {#noop this is for an alias with 1 argument} {#if (%null(%3)) {#noop this is for an alias with 2 arguments} {#noop this is for an alias with 3 arguments}}}

That might be a little slow, so perhaps you might be better off with distinctions between entire lines of arguments:

#if (%null(%1)) {#noop this is for no arguments} {#case %ismember(%-1,@aliasarguments) {} {} {} {} {}}

This should be faster, but it's likely to be tedious to write and might have a bit of redundancy, but that depends entirely on how diverse your arguments list will be.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net