Page 1 of 1

UNABLE TO PARSE ERROR "E"

Posted: Wed Jul 06, 2005 12:05 am
by BigGuy
http://www.macroquest2.com/wiki/index.php/Macro_Error

to fix all the ${String[].Equal[Null] problems I looked through the forums and seen several postings on removing the string wrapper from the statement and all should work. When attempting to edit adv_fishing it has the string container wrapped around the ini file and array. when you remove the container it just does not fill the array. This results in all loot being dropped.

The manual showed illustrations for ini and keys but none for arrays. being new to this syntax has me on the bottom of the learning curve somewhat.

I appreciate your patience and look forward to picking this up quickly

Posted: Wed Jul 06, 2005 12:24 am
by JimJohnson

Code: Select all

/if (${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}.Equal[null]}) {

I belive

Posted: Wed Jul 06, 2005 12:35 am
by dman
the ${Ini} Tlo will return a string, your attempted fix sets this string up into a numeric comparison which will fail. A better fix than comparing to null as the macro did, would be to give the Ini variable a default value it returns if the information is not available. The syntax is as follows:

Code: Select all

${Ini[Filename, SectionName, KeyName, default]}
if you look through the macro you can see it does not make use of the default value but would be better off doing so. I would change the macro to be:

Code: Select all

  /if (${Ini[${FileName},${SectionName},${ArrayType}${nValues},NOTFOUND].Equal[NOTFOUND]}) { 
     /varcalc nValues ${nValues}-1 
     /goto :MakeArray 
  } 
  /varcalc nValues ${nValues}+1 
  /goto :CounterLoop 
To directly convert the line as it is without adding anything to it, but not guarenteed to do what you want as Lax posted in another thread comparing vs null isn't the best course of action, try:

Code: Select all

  /if (${Ini[${FileName},${SectionName},${ArrayType}${nValues}].Equal[null]}) { 
     /varcalc nValues ${nValues}-1 
     /goto :MakeArray 
  } 
  /varcalc nValues ${nValues}+1 
  /goto :CounterLoop 

Posted: Thu Jul 07, 2005 5:54 pm
by BigGuy
Thanks for your help. I tried the suggested code but still was not happening then using the suggested code changed to this block:

Code: Select all

:CounterLoop 
   /if (${Ini[${FileName},${SectionName},${ArrayType}${nValues},NULL].Equal[NULL]}) { 
     /varcalc nValues ${nValues}-1 
     /goto :MakeArray 
  } 
  /varcalc nValues ${nValues}+1 
  /goto :CounterLoop 

and worked smoothly. on more peice on the knowledge stack. thanks for your help and consideration.