To be fair I did that and I was working off the core engine code rather than the plugin code.
MV Equipment requirements Issue
Javascript/Plugin SupportCould you try
You can try removing all four curly braces too. It might still work without them.
JavaScript:
if(a.hasArmor($dataArmors[66]){
a.changeEquip($dataArmors[66].etypeId-1, $dataArmors[0]);
}
if(a.hasArmor($dataArmors[67]){
a.changeEquip($dataArmors[67].etypeId-1, $dataArmors[0]);
}
You can try removing all four curly braces too. It might still work without them.
Could you try removing the curly braces?
JavaScript:
if(a.hasArmor($dataArmors[66])
a.changeEquip($dataArmors[66].etypeId-1, $dataArmors[0]);
if(a.hasArmor($dataArmors[67])
a.changeEquip($dataArmors[67].etypeId-1, $dataArmors[0]);
It will - conditionals automatically apply to the next single code statement.
You missed some close parentheses on each conditional.
Code:
if (a.hasArmor($dataArmors[66]))
a.changeEquip($dataArmors[66].etypeId-1, null);
if (a.hasArmor($dataArmors[67]))
a.changeEquip($dataArmors[67].etypeId-1, null);
(there was nothing wrong with the $dataArmors[0] bit, this is just a bit more straightforward)
I think I missed a pair of parentheses
JavaScript:
if(a.hasArmor($dataArmors[66]))
a.changeEquip($dataArmors[66].etypeId-1, $dataArmors[0]);
if(a.hasArmor($dataArmors[67]))
a.changeEquip($dataArmors[67].etypeId-1, $dataArmors[0]);
THAT WORKED!! Thank you both so much for all the help. I really truly appreciate it.
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you~!
Original thread: https://forums.rpgmakerweb.com/threads/equipment-requirements-issue.162051/