$getlastfindslot formatting?

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

se7en
orc pawn
orc pawn
Posts: 21
Joined: Sun Dec 14, 2003 6:51 pm

$getlastfindslot formatting?

Post by se7en » Tue Feb 24, 2004 3:55 am

I searched and found very little on the variable -- However I'm trying to use $getlastfindslot to put something back where it found it from using /finditem however its formatting is improper for use with /click.

Code: Select all

/click left pack $getlastfindslot
this produces 2,2 or 4,3 etc etc.. when I need the format to be "2 2" or "4 3" in order to use it in conjunction with /click. Is there a way to clean up the formatting and just replace the comma with a space? :oops:

Thanks for any help in advance :)

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 » Tue Feb 24, 2004 9:07 am

I updated the manual to reflect this. It does in fact return:

pack#,slot# with a comma separating the two numeric values.

There are ways to extract the values, but hopefully the devs can adjust the return to be pack# slot#.

**EDIT

Changing the following in the code would make $getlastfindslot work the way you want. However, it is not a change the devs have made (yet?).


In

Code: Select all

VOID FindItem(PSPAWNINFO pChar, PCHAR szLine) 
Change

Code: Select all

sprintf(gLastFindSlot,"%d,%d",PriSlot,BagSlot); 
to

Code: Select all

sprintf(gLastFindSlot,"%d %d",PriSlot,BagSlot); 
This makes /click left pack $getlastfindslot work as you want it to

se7en
orc pawn
orc pawn
Posts: 21
Joined: Sun Dec 14, 2003 6:51 pm

Post by se7en » Tue Feb 24, 2004 5:31 pm

you are amazing Wassup! Worked perfectly!

Thank you!!!! :)

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 » Tue Feb 24, 2004 10:50 pm

No, the devs are amazing at the work they do. I'm not even a novice at coding, but I am able to interpret some simple stuff in the coding.