question about parameters
Moderator: Moderators
question about parameters
Parameters seem to be separated by spaces. What do you do if you want there to be a space in one of your parameters?
Re: question about parameters
give a exemple what you want pls
Re: question about parameters
macro mymacro -- old blue box
I want
$.param1 = old blue box
I do not want
$.param1 = old
$.param2 = blue
$.param3 = box
I want
$.param1 = old blue box
I do not want
$.param1 = old
$.param2 = blue
$.param3 = box
Re: question about parameters
in no way, try use:
macro mymacro -- 1
macro mymacro -- 1
Code: Select all
macro mymacro {
if ($.param1 == 1) {
$param1 = old blue box
}
...
}
Re: question about parameters
That would not work the way I want it to. My idea for parameters is to allow changing the item name I want to look up. I don't want to have to go into my macro file every time to change it.
One solution I found but I don't like is.
macro mymacro {
if ($.param5 == 4) goto ok4
if ($.param5 == 3) goto ok3
if ($.param5 == 2) goto ok2
if ($.param5 == 1) goto ok1
:ok4
log @storamount($.param1 $.param2 $.param3 $.param4)
stop
:ok3
log @storamount($.param1 $.param2 $.param3)
stop
:ok2
log @storamount($.param1 $.param2)
stop
:ok1
log @storamount($.param1)
stop
}
It's redundant, but I would only have to go as far as like 3-4 extra steps because I don't know if any item contains more than 3-4 spaces. It would be annoying to call.
macro mymacro -- will of the darkness 4
macro mymacro -- jellopy 0 0 0 1
Also I tried running this macro but got a syntax error in my if statement. Very confused by this. I like the syntax of these if statements more but because they don't work for some reason I have to use the one above.
macro mymacro {
if ($.param1 == 1) {
log success
}
}
One solution I found but I don't like is.
macro mymacro {
if ($.param5 == 4) goto ok4
if ($.param5 == 3) goto ok3
if ($.param5 == 2) goto ok2
if ($.param5 == 1) goto ok1
:ok4
log @storamount($.param1 $.param2 $.param3 $.param4)
stop
:ok3
log @storamount($.param1 $.param2 $.param3)
stop
:ok2
log @storamount($.param1 $.param2)
stop
:ok1
log @storamount($.param1)
stop
}
It's redundant, but I would only have to go as far as like 3-4 extra steps because I don't know if any item contains more than 3-4 spaces. It would be annoying to call.
macro mymacro -- will of the darkness 4
macro mymacro -- jellopy 0 0 0 1
Also I tried running this macro but got a syntax error in my if statement. Very confused by this. I like the syntax of these if statements more but because they don't work for some reason I have to use the one above.
macro mymacro {
if ($.param1 == 1) {
log success
}
}
Re: question about parameters
try use the item ID
Re: question about parameters
Haha that would work, but I can't memorize all of those. Just wanted a way to see how many of some items I have without scrolling through every other item in my storage. I mean I have something that works, I just don't like it lol.
And nevermind.. I have been using an older version of the macros or something when trying this. When I logged on with a newer version, this call worked.
macro mymacro -- "old blue box"
$.param1 == old blue box
I need to update all my stuff. Thanks for help though.
And nevermind.. I have been using an older version of the macros or something when trying this. When I logged on with a newer version, this call worked.
macro mymacro -- "old blue box"
$.param1 == old blue box
I need to update all my stuff. Thanks for help though.