Small bug with $char(ismoving)

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

MattHensley
decaying skeleton
decaying skeleton
Posts: 7
Joined: Sat Oct 04, 2003 7:18 pm

Small bug with $char(ismoving)

Post by MattHensley » Wed Oct 08, 2003 11:44 pm

I'm sure this is a simple fix but say you do a

/if "$char(ismoving)"=="TRUE"

you will get an error, yet

/if "$char(ismoving) "=="TRUE"

works.. ( space between the ')' and '"'
-MattHensley

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

Post by MacroFiend » Wed Oct 08, 2003 11:53 pm

Fix for $char(ismoving) and a correction for $char(speed). Changes in red.

EQLib_MacroParser.cpp

Code: Select all

	// $char(speed)
	} else if (!strncmp("char(speed)",szVar,[color=red]11[/color])) {
		CHAR szTemp[MAX_STRING] = {0};
		i+=10;
		sprintf(szTemp,"%1.2f",pChar->SpeedRun);
		strcat(szOutput,szTemp);

	// $char(ismoving)
	} else if (!strncmp("char(ismoving)",szVar,14)) {
		[color=red]i+=13;[/color]
		if (gbMoving && (pChar->SpeedRun==0.0f)) {
			strcat(szOutput,"TRUE");
		} else {
			strcat(szOutput,"FALSE");
		}

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Thu Oct 09, 2003 9:18 am

Updated in CVS.
MQ2: Think of it as Evolution in action.