using varvar condition in automacro

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

xxstreme
Human
Human
Posts: 20
Joined: 03 Dec 2008, 15:46
Noob?: Yes

using varvar condition in automacro

#1 Post by xxstreme »

how to using varvar condition in automacro?

any example? i didn't find an example in macro manual

i can using var condition but i didn't get how to using varvar

in var condition just use name without '$' sign in macro variable

any idea? and tutor or example?
Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: using varvar condition in automacro

#2 Post by Kaspy »

[EN]
To set a variable, use the var or varvar (do not know the difference).
For example:

Code: Select all

var brazil
varvar brazil
To use it, use the $NameFromVar.
For example:

Code: Select all

var $brazil == 1
To perform equations, the uses @eval

Code: Select all

$variavel = @eval (value [operating] value)

Can something is wrong, because I never really liked macros to be something more limited, so do not really studied them.

[PT-BR]
Para definir uma variável, use o var ou varvar (não sei a diferença).
Por exemplo:

Code: Select all

var brasil
varvar brasil
Para usa-la, use o $NomeDaVar.
Por exemplo:

Code: Select all

$brasil == 1
Para realizar equações, use o @eval

Code: Select all

$variavel = @eval (valor [operador] valor)

Posso esta errado em algo, pois nunca gostei muito de macros por ser algo limitado de mais, então não estudei muito elas.
Image
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: using varvar condition in automacro

#3 Post by EternalHarvest »

do not know the difference
because I never really liked macros to be something more limited, so do not really studied them
Why even reply? That post of yours is just misleading and has no information about so-called nested variables [sic] varvar uses.
To set a variable, use the var or varvar
Neither set any variables.
Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: using varvar condition in automacro

#4 Post by Kaspy »

[EN]
Usually in foreign forums, I just could not explain what I mean right to avoid problems in the translation... But...

I do not know much about macros, but this passage is not quite my own, but a posting from another author on the Brazilian forum (http://openkore.com.br/index.php?/topic ... entry17205), the fact that I have not really focused on my macros could only have caused problems when checking the posting. Reviewed and found no problems when they posted this up because I've done something very similar.

Can you explain the difference between var and varvar?



Sorry for the inconvenience, I will avoid committing these problems again ...

[PT-BR]
Normalmente, em fóruns estrangeiros, eu acabo não explicando direito o que quero dizer para evitar problemas na tradução... Mas...

Eu não sei muito de macros, mas esse trecho não é bem de minha autoria, e sim de uma postando de outro autor no fórum brasileiro (http://openkore.com.br/index.php?/topic ... entry17205), o fato de eu não ter me focado muito em macros apenas poderia ter ocasionado problemas na hora de verificar a postagem. Revisei e não encontrei problemas na hora de ter postado isso, até por que já fiz algo bem semelhante.

Pode me explicar qual a diferença entre var e varvar?



Desculpe o inconveniente, irei evitar cometer esses problemas novamente...
Image
xxstreme
Human
Human
Posts: 20
Joined: 03 Dec 2008, 15:46
Noob?: Yes

Re: using varvar condition in automacro

#5 Post by xxstreme »

i always fail to use varvar condition

Code: Select all

automacro start {
var set == 1
call{
do something....
$set = 0
}
}

macro goin {
$set = 1
}
this automacro start will triger after i use macro goin, that will set var from $set to 1

but if like this never triger

Code: Select all

automacro start {
varvar set == 1
call{
do something....
$set = 0
}
}
as i remember long time ago about 3 or 4 years ago
varvar use with variable special variable or special keyword

Code: Select all

automacro empty {
varvar @invamount(...) <= 1
call {
...
}
}
i was forgot how to using with varvar in macro
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: using varvar condition in automacro

#6 Post by EternalHarvest »

varvar isn't for @-keywords. As manual says, it's for checking "nested variables". If you aren't using them, you don't need varvar.