Difference between /varcalc and ${Math.Calc[]}?

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Difference between /varcalc and ${Math.Calc[]}?

Post by LordGiddion » Tue May 04, 2004 8:50 pm

This code errors with test[1] not found and then echos 30.

Code: Select all

Sub Main
   /declare test[30] int outer
   /varset test[1] 30
   /varcalc test[1] ${test[1]}-5
   /echo ${test[1]}
/return
this Code works as expected and echos 25.

Code: Select all

Sub Main
   /declare test[30] int outer
   /varset test[1] 30
   /varset test[1] ${Math.Calc[${test[1]}-5]}
   /echo ${test[1]}
/return

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Tue May 04, 2004 8:52 pm

Sounds to me like /varcalc doesn't like arrays.

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Tue May 04, 2004 9:45 pm

/varcalc and /vardata would both error if you tried to set arrays. fixed for next zip.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0