Blockland Forums > Help
Checking for multiple variables in one If statement
(1/1)
Murilliom,:
Is this possible?

I need to check for two different variables in one If statement in VCE.

Both will be checked to have the same value obviously, I just need to know if I'm typing something in wrong because I can't seem to get it to work. ( [A B] or [A, B] do not work)

Any suggestion/resource/link that can help me fix or find another way around this problem would be appreciated.

Mold:
No you can't.

What you can do is
ifVariable [var1] [==] [var2] [num num]
Doomonkey:
What are you using it for?

You could just check one variable, and if that is true check the second. Then if that is true do the desired event.
Murilliom,:

--- Quote from: Doomonkey on August 19, 2012, 02:28:32 PM ---What are you using it for?

--- End quote ---

I was using for a smelter that requires both coal and ore to function.


--- Quote from: Doomonkey on August 19, 2012, 02:28:32 PM ---You could just check one variable, and if that is true check the second. Then if that is true do the desired event.

--- End quote ---

I understand what you're saying. I've already used that system for upgrades.

My problem was trying to enable large quantities of coal and iron to be smelted.
For example: it first checks for 100 coal & ore, then 50, then 10, and so on.

I had already done something similar with enabling resources to be quickly transferred into a "team stockpile". However, doing the same while simultaneously checking two different variables proved to be rather messy and unnecessary.

At any rate, I've had to work around it, but I have fixed the problem.

Thanks for the help nonetheless.
Navigation
Message Index

Go to full version