[Fwd: Re: [TF] recasting]
Brought to you by:
kenkeys
|
From: johans at stack.nl (J. v. Selst) - 2003-04-03 07:40:14
|
Hi Jason,
jobs wrote:
> I tried this several diff ways
> /if P1 == Infravision|\
> /if (%P1 == Infravision|\
> /if (%P1 == (Infravision|\
> /if (P1 == Infravision|\
> /if (P1 == (Infravision|\
TF uses == for numeric equality and =~ for string equality.
Literal strings should be quoted with single (') or double (") quotes.
See /help expressions for more info.
So you could do something like
/if ({P1} =~ 'Infravision' | {P1} =~ 'Sense danger') \
If you want to use regular expressions (with |) then you should use
regmatch() instead. E.g.
/if (regmatch('Infravision|Sense danger', {P1})) \
> Also pretty confused as to why it says the there was no /then
> command.....it's right there...
You don't need to use /then if the /if is followed by brackets. But
otherwise the /if-expression should end with a seperator (%;) before the
/then statement. See /help if for details and examples.
Ciao,
Johan
--
Johan van Selst <jo...@st...> Koresh@OuterSpace
PGP: finger jo...@va... telnet mud.stack.nl 3333
|