Page 1 of 1

String comparison

Posted: Sat May 22, 2004 2:27 pm
by inthrall
This used to work just fine:

Code: Select all


   /varset Questgiver ${Target.CleanName}
   /if (${String[Lita Hegeway].Equal[Questgiver]}) {
      /say "whatever"
   }

But now I have not been able to figure out how to do this comparison, someone please help me, thank you

Re: String comparison

Posted: Sat May 22, 2004 2:34 pm
by wassup
inthrall wrote:This used to work just fine:

Code: Select all


   /varset Questgiver ${Target.CleanName}
   /if (${String[Lita Hegeway].Equal[Questgiver]}) {
      /say "whatever"
   }

But now I have not been able to figure out how to do this comparison, someone please help me, thank you
RTFM again...

Anyway... Questgiver is a string variable right?

Code: Select all

   /varset Questgiver ${Target.CleanName}
   /if (${Questgiver.Equal[Lita Hegeway]}) {
      /say "whatever"
   }

Posted: Sat May 22, 2004 2:40 pm
by inthrall
Ty.. and no offense, but ive been reading TFM but in my experinece it has not been updated as often as the project is so it becomes futile

Posted: Sat May 22, 2004 2:55 pm
by wassup
inthrall wrote:Ty.. and no offense, but ive been reading TFM but in my experinece it has not been updated as often as the project is so it becomes futile
*cough* Bullshit *cough*

From the most recent readme in the current zip:

MQ2DataVars section
Overview
MQ2Data was designed so that accessing information could be done utilizing a uniform system. User variables are utilized as MQ2Data Top-Level Objects.
Then read Macroquest2 Data Types section... specifically:
Syntax
The basic syntax for usage is something like this:

${TopLevelObject[index].Member[index].Member[index]}

Re: String comparison

Posted: Sat May 22, 2004 3:00 pm
by Mister Peepers
[quote="inthrall"]

Code: Select all


   /varset Questgiver ${Target.CleanName}
   /if (${String[Lita Hegeway].Equal[[size=150][color=darkred]Questgiver[/color][/size]]}) {
      /say "whatever"
   }

Read the manual and take a lookt at whats been highlighted and tell me why its not working.