BUG: Math.Distance[]

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

BUG: Math.Distance[]

Post by wassup » Fri Apr 02, 2004 11:14 am

The following test macro works fine up to the Math.Distance[] line. This is when only the new parms system is enabled.

Code: Select all

Sub Main
    /declare locX local
    /declare locY local
    /varset locX ${Math.Calc[${Target.X}-${Math.Sin[${Math.Calc[${Target.Heading}*10]}]}]}
    /echo @locX
    /varset locY ${Math.Calc[${Target.Y}-${Math.Cos[${Math.Calc[${Target.Heading}*10]}]}]}
    /echo @locY
    /echo ${Math.Distance[${Me.X},${Me.Y}:@locX,@locY]}
/endmacro
If you run the above macro with only the new parms enabled you get

105.23[]
-35.21[]
${Math.Distance[25.34,136.23:300.51[][]

where [] represent the symbol for cr+lf

If you enable the old parms system AND the new parms system, the above macro works as intended, and does not display the [] symbol for cr+lf after each echo'd line of text.

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Fri Apr 02, 2004 12:20 pm

/threadderail on

Hey Wassup, are you updating the readme.html with all the new shtuff from lax? :)

/threadderail off

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Fri Apr 02, 2004 3:18 pm

Yes, I am... just going through some things so I can come up with examples etc... Oh, and it will be a chm file, not an html, but will do a conversion to html for the website.

I was converting a macro for use as an example, which is how I found this bug.