|
Shogi Newbie
Joined: 05 Mar 2008 Posts: 3
|
Posted: Wed Mar 05, 2008 7:35 pm
Help with expressions |
Hi, I was hoping someone could help me with an issue.
Assume a predefined variable named: @Target
The first two show statements are just for testing purposes.
I want if I type 'fire x' for it to pass the x on to the Target variable
If I type 'fire' it just uses the pre-deffinition. I'm pretty sure the error revolves around the '!' parameter in the first statement. But I don't know what I'm doing wrong. Any helpful suggestions would be appreciated.
Code: |
#IF (%1="!%null") {#VAR Target %1}
#VAR Casting 1
#VAR Recast {flame strike}
#SHOW {Target='@Target'}
#SHOW {Variable='%1'}
#CLASS SpellResolve 1
#IF (@Energi=0) {
#SE embrace
#WAIT
}
#SHOW {[Casting: Flame Strike]}
#COLOR 14
#SE {channel 'flame strike' @Target} |
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Mar 05, 2008 7:47 pm |
You shouldn't put %null in quotes, and you shouldn't put the ! inside them either. You want (%1 != %null) or (%1 = !%null). However, you mean "If %1 has a value", so you should just use #if (%1).
|
|
|
|
Shogi Newbie
Joined: 05 Mar 2008 Posts: 3
|
Posted: Wed Mar 05, 2008 8:18 pm |
Thanks for the quick reply. That fixed it. I feel like an idiot now.
|
|
|
|
|
|