MV Equipment requirements Issue

@slickdeath97 Did you read the instructions for the plugin you're using? They say


I don't understand why you'd go messing around with stuff looking for and referencing actor IDs.
To be fair I did that and I was working off the core engine code rather than the plugin code.
That means there's an extra curly brace in the syntax or it's missing the first closing one. Did you copy/type it in exactly as I posted?
I copy and pasted the code exactly how you put it above.
1698254220124.png
1698254243307.png
1698254260077.png
Could you try
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
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.
Copied it exactly how you have it:
1698255040291.png
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]);
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]);
Gave me another error:
1698255349689.png
You can try removing all four curly braces too. It might still work without them.
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]);
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)
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/