  | 
	
	
	
		daemoan.vermillious Apprentice
  
  Joined: 28 Feb 2009 Posts: 135 Location: Chico, Ca
  | 
		
		  
			
			   Posted: Sun Jan 24, 2010 5:56 am   
  need help with a IF NOT situation   | 
			 
			
				I have a simple target variable = 
 
@target
 
 
I have also alias like this =
 
#alias go "shadowstep %1"
 
 
I would like to make something like this =
 
#alias go "shadowstep %if{%1}{@target}"
 
or something like that?
 
 
If %1 is not there substitute with target.
 
 
If some one Could help me with that, It would be great thanks. | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		MattLofton GURU
 
  Joined: 23 Dec 2000 Posts: 4834 Location: USA
  | 
		
		  
			
			   Posted: Sun Jan 24, 2010 6:07 am      | 
			 
			
				you're on the right track, just using bad syntax in the %if() function:
 
 
shadowstep %if(%null(%1),@target,%1)
 
 
To take it a step further, you can also check on @target:
 
 
	  | Code: | 
	 
	
	  #switch ((@target = "") and %null(%1)) {#print HEY, WAIT! YOU DIDN'T PROVIDE A TARGET!}
 
  (!%null(%1)) {shadowstep %1}
 
  (1) {shadowstep @target}
 
 | 
	 
 
 | 
			 
		  | 
	
	
	  
		  
		    
			  _________________ EDIT: I didn't like my old signature | 
			       | 
			 
		   
		 | 
	
	
		  | 
	
	
		| 
		
		 | 
	
	
		 |