|
stark62 Wanderer
Joined: 04 Apr 2003 Posts: 94 Location: United Kingdom
|
Posted: Fri Feb 06, 2009 4:16 pm
if and variables |
Ok lets say i got 3 variables @one @two and you guessed it @three
how do i make the following work
at the moment i have triggers that will add items to @one @two as things happen
alias GO
IF @one (has a value in a stringlist - say hi - however if it has nothing entered into the list eg blank say bye)
ultimately I want to
look at @one (if value - take action) (if blank look at @two) (if value - take action) (if blank look at @three) (if value - take action) if blank do final action |
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Fri Feb 06, 2009 4:29 pm |
You mention a stringlist for the variables. Is what you are looking for something that can be contained within the string lists, or just if there is anything in the list at all?
|
|
|
|
stark62 Wanderer
Joined: 04 Apr 2003 Posts: 94 Location: United Kingdom
|
Posted: Fri Feb 06, 2009 4:41 pm |
just if it has anything eg
you find an egg
tr additem @one egg etc etc so @one becomes egg:duck:curry etc etc
so then when i use the alias above GO
IF @one (egg:duck:curry) smile
IF @one (empty) frown |
|
|
|
stark62 Wanderer
Joined: 04 Apr 2003 Posts: 94 Location: United Kingdom
|
Posted: Fri Feb 06, 2009 4:50 pm |
so to use above examples
IF @one (egg:duck) get duck, if @one (empty - no value) check @two |
|
|
|
stark62 Wanderer
Joined: 04 Apr 2003 Posts: 94 Location: United Kingdom
|
Posted: Fri Feb 06, 2009 5:11 pm |
Doh if only I read more - i guess it is %null
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Feb 06, 2009 5:43 pm |
Your question seems a bit confused--each of your message is looking for a different result. For your first question, you are looking for something like this:
Code: |
#if (@one) {say hi} {say bye}
|
|
|
|
|
|
|