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
Dyron
Apprentice


Joined: 08 Apr 2004
Posts: 103
Location: USA

PostPosted: Thu Oct 09, 2008 7:29 pm   

abort question
 
I've been using abort commands to stop any scrolling in an alias file, but I just realized it's stopped other elements in a trigger under that alias.. Here's an example:

alias name: obal
alias pattern:
Code:

#IF (%ismember( stun, @afflictions)) {
  #say Stunned!
  #abort 2
  }
#IF (%ismember( belonephobia, @afflictions)) {
  #say Belonephobia
  #abort 2
  }
#IF (%ismember( aeon, @afflictions)) {
  #say Aeon
  #abort 2
  }
#IF (%ismember( indifference, @afflictions)) {
  #say Indifference
  #abort 2
  }
reconbal


If any of those are present, I wish to abort any commands following them in that alias..

So lets say.. I've got a trigger on:
Pattern: Check for your balances!
Value: obal;pbal;tbal

I want it to check for those items.. if an item in obal aborts, I want the trigger to still execute pbal and tbal.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Oct 09, 2008 8:06 pm   
 
Put the #if statements in the else-command part of the #if before. So:

#if (something) {command} {#if (something) {command} {#if (something) {command}}}

It's not pretty, I know, but it's the best there is without the #switch command in CMUD.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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