Page 1 of 1

need some help with #1# #2# #3#

Posted: Fri Feb 18, 2005 5:55 am
by mauroxx
need some help with #1#

Code: Select all

/if (${Fulltext.Equal[MGB #1#]}) { 
   /call cast "Mass Group Buff" alt 
   /call cast "${Parameter}" gem8 2s 
   /return 
 }
how are linked #number# and ${Parameter} name?
i mean... if i have

#1# #2# #3#

and i have to do somthing like

Code: Select all

/tell #1# Hey #2#! This is #3#'s bot! Plz tell him (just an example)
any help appreciated

Mauroxx

Posted: Fri Feb 18, 2005 6:34 am
by aChallenged1
Use of a parameter is ${Param0} ${Param1}...${Param#}

Some examples can be found in the following threads:

Tribute Search

Pull Mac

PL Assist now with INI support

Search is your friend.
I searched for nothing more than Param0 to get those, and many many more.

yes... ok but...

Posted: Fri Feb 18, 2005 7:21 am
by mauroxx
ok it is ${Param0} ${Param1}... but that is for /mac macroname.mac Param0 etc etc

wouldnt it collapse if u use same name in a subroutine for chat ceking if u use again Param0 Param1 Param2?

Mauroxx

Posted: Fri Feb 18, 2005 7:39 am
by aChallenged1
Did you even bother to go to the freaking links I provided to start learning from the examples there?

yes

Posted: Fri Feb 18, 2005 8:29 am
by mauroxx
i can grant you that, and soon completed good macro... but still have doubt on that parameters

Posted: Fri Feb 18, 2005 9:17 am
by Zeus
Correct me if I'm wrong but Parameters are for the mac. Like if you type /mac mymacro a b c d, a is the first parameter and d the 4th. When dealing with events and the #1# etc those are the values the function that handles the event receives. So something like

Code: Select all

#event Blah hello #1# and #2#
Would have a corresponding event

Code: Select all

Sub event_Blah(string line, string first, string second)
Where line is the full line it receives first (which you can call whatever you want and can be whatever variable type) is what the parser gets inside the #1# and same for second and #2#.

Ps: This is explained pretty good in TFM.