Quote:
I am trying to improve my system and was wondering if I have the coding right for this ...
The syntax looks OK, the question is, what do you really want to achieve?
It would help if you indented your code a bit, like this:
if GetVariable ("herbblance") == "0" then
if GetVariable ("slickness") == "1" then
Send ("outr calamus")
Send ("eat calamus")
if GetVariable ("slickness") == "0" then
if GetVariable ("stupidit") == "1" then
Send ("outr pennyroyal")
Send ("eat pennyroyal")
end
end
end
end
This is the same code, and it will do the same thing, however it makes it clearer that nothing will happen if the variable "herbblance" is not zero. Maybe or maybe not this is what you want.
It might help to write out in English what you are hoping to do, and then code from that. For example, what you effectively have is this:
- If "herbblance" is not zero, do nothing at all.
- If "slickness" is not one, do nothing at all.
- Otherwise, send "outr calamus" and then "eat calamus"
- If "slickness" is not zero, and "stupidit" is not one, do nothing more
- Otherwise, send "outr pennyroyal" and then "eat pennyroyal"
Is that really what you mean?
I should also point out, that both "herbblance" and "stupidit" look like misspellings to me. That is OK if they are simply variables and you are consistent, but if not, you will have other problems.