Moderator: MacroQuest Developers
Code: Select all
/macro donate.mac 20
Code: Select all
/declare dollarAmount int outer
Sub Main
:verify
/if (!${Defined[Param0]}) {
/echo You must set a value to donate to MQ2 developers.
/echo Any/all donations are accepted.
/echo hytiek is not a developer but he will accept donations.
/end
} else {
/varset dollarAmount ${Param0}
/popup INCOMING: Explanation!
}
/goto :example
:example
/echo Let's log off, and donate ${dollarAmount} to the MQ2 developers.
/goto :example
:end
/return
The other example isn't quite rightNeolesh wrote:Been looking at the documentation trying to figure out how this is done. Basically I want to declare an int variable from the command line when I start the macro much like genbot declares a master list?
How is this done? and don't go through too much trouble if it's complex. Perhaps just point me to a command I could look up in the documentation.
Code: Select all
Sub Main(int myValue)
/echo Parameter Value: ${myValue}
/return
Code: Select all
Sub Main(int myValue)
/declare intValue int outer ${myValue}
/echo Parameter Value: ${intValue}
/return

