Page 1 of 4

Bug: $char(buff,"Buff Name")

Posted: Wed Jun 04, 2003 3:45 pm
by kagonis
When calling that it crashes EQ to desktop.

Posted: Wed Jun 04, 2003 6:08 pm
by Amadeus
Can you give me an example macro with 'echo' output for me to test it?

I'll look into it then.

Posted: Wed Jun 04, 2003 10:19 pm
by kagonis
Well..
I merely tried to test it by running a simple /echo within EQ. Ie:

/echo $char(buff,"Blessing of Reverence")

Wich in turn should tell me what buffslot it is in, or that it isnt on me, but it just crashed eqclient..

Was testing it to find out exactly how it worked, to make a macro to keep buffs up on me at all times, by alerting me when a buff is no longer on me etc.

Posted: Thu Jun 05, 2003 8:20 am
by ap50
Got a horse up at the time ?

Posted: Sun Jun 08, 2003 4:55 am
by Plazmic
buff window stuff will blow up... It current checks for 0xFFFFFFFF as "no spell in that slot", just like gem and book do.
The problem is, buff should actually be checking against 0xFFFF.

The crash is then caused by GetSpellNameById having a local define of szUnknown.

So, change all 0xFFFFFFFF's to 0xFFFF inside the $char(buff,xxx) handler, and remove the local szUnknown from GetSpellNameById (and for extra clarity, rename the global on to szUnknownSpell)

Posted: Sat Jun 14, 2003 4:57 am
by kagonis
I'm not very thrilled about messing directly in the source, since I honestly donøt know anything about the C++ programming language.

Is this something that is going to be changed in CVS, so it will work for everyone? Or do I have to slap myself hard and actually risk having some fun messing up the sources on my own? :p

I do a compile of latest CVS daily, so if the change has reached CVS Iøm pretty sure I am using that version.

$char(buff,xxx) still crashes me however, so perhaps I will try and do more than simple scripting :) I might just learn something, can't have that ;)

Posted: Sat Jun 14, 2003 10:14 am
by Mckorr
Hey Plaz, how about making those changes in the CVS for us :)

Posted: Sat Jun 14, 2003 11:58 pm
by Plazmic
If I made a CVS change, people would think I was working on MQ again ;)

I do have a real contribution coming up that will help people diagnose bad macros, and fix some crashes related to badly written macros.

Any of these small random tidbits will get checked in then if they aren't in CVS yet.

Posted: Sun Jun 15, 2003 12:12 am
by Amadeus
I also have some stuff sent into DKAA right now that will fix a couple things.

Posted: Sun Jun 15, 2003 12:37 am
by Plazmic
I'm mostly concerned about finding out what went wrong if the macro 'sucks'...
My patch consists of changing all error spew and EndMacro(pChar,"")'s into a GracefullyEndBadMacro that will dump the calling stack of the macro up to that point including source file and line number from the script.

Posted: Mon Jun 16, 2003 3:52 pm
by icon
Whoa, Plazmic!? Who's that?

Forgive me if I'm wrong but isn't the dev named "Plazmic" just a myth?

Somebody pinch me!

- Icon

Posted: Mon Jun 16, 2003 4:17 pm
by kagonis
Back to the buff thing, Plaz, to your post:
Could you give me some hints where to make the suggested changes?
What file I need to open, what string I need to find, and edit?

Would really love to have that working since I could really use a simple macro to keep an eye on my buffs (I tend to forget to look) then warn me when a buff is either fading or has faded.

Thanks in advance :)

Posted: Mon Jun 16, 2003 5:36 pm
by wassup
kagonis wrote:Well..
I merely tried to test it by running a simple /echo within EQ. Ie:

/echo $char(buff,"Blessing of Reverence")

Wich in turn should tell me what buffslot it is in, or that it isnt on me, but it just crashed eqclient..

Was testing it to find out exactly how it worked, to make a macro to keep buffs up on me at all times, by alerting me when a buff is no longer on me etc.
I tried this today and it also made the client crash to desktop.

Was not on a horse or drogmor.

Posted: Wed Jun 18, 2003 8:26 pm
by kagonis
Would really love to get a macro put together that reminds me at all times when a buff is no longer one me. I am too forgetfull to remember to check for those buffs myself :)

So, the solution suggested, is the easy implemented or something? :)

Posted: Wed Jun 18, 2003 11:10 pm
by Amadeus
This bug was caused by me without realizing it. The fix is quite easy and I'll get it checked in next time around...but, for now, simply go to MQ.h and find these two lines:

Code: Select all

/*0x04*/	WORD      SpellID;
/*0x06*/	WORD      Unknown0x06;
Remove the second line entirely and make the first line read:

Code: Select all

/*0x04*/	DWORD      SpellID;

...there is an update coming to SPELLBUFF already new in the CVS, so I won't confuse the matter by posting the complete struct here; however, if you simply remove the /*0x06*/ line completely, and then make it DWORD instead of WORD ..you should be fine. You shouldn't have to edit EQLib_MacroParser.cpp once this is corrected.

Anyway, this should correct most of the issue that Plaz was mentioning in his post. The part about the szUnknown returning weird things from GetSpellByID..I didn't quite follow...so, if this doesn't fix it entirely..let me know.