- Joined
- Dec 2, 2016
- Messages
- 733
JASS:
if (!UnitHasItemOfTypeBJ(u, 'I00Z') == false || !UnitHasItemOfTypeBJ(u, 'I00J') == false) {
}
else
{
DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "Yes");
SetUnitState(u, UNIT_STATE_MANA, currMana);
}
}
So I added the else because for some reason regardless if I set false or true or != true, etc. It would always run even though I had the item, and when I didn't have the item it wouldn't run.
Before I had this
if (UnitHasItemOfTypeBJ(u, 'I00Z') != true|| UnitHasItemOfTypeBJ(u, 'I00J') != true) {
I had the item, and it would still run the code. And now I added the !unithasitem part, and it still runs it and I needed to add the else statement. Why is that? Am I reading this incorrectly? Sorry if this is confusing not sure how to explain it better.