Equip change variable - need code help

Hey there!

I found a plugin (by Waynee95) that will allow me to change variables on Equip and Remove Equip, but it requires coding ^.^'
(original thread I found this in: https://forums.rpgmakerweb.com/index.php?threads/equip-change-affect-variables-solved.82071/)

Empty it's this:

Weapon and Armor Notetag:
<Custom On Equip Eval>
code
</Custom On Equip Eval>
This code will run when the actor equips the item.

<Custom On Remove Equip Eval>
code
</Custom On Remove Equip Eval>

All I want to do is increase a variable (Variable # is 100) on equip, and decrease it on un-equip.


Angel Carlito on the same thread showed his own example script, this looks like gibberish to me, but here it is:


<Custom On Equip Eval>
var tempvalue = $gameVariables.value(16);
tempvalue = tempvalue + 1;
$gameVariables.setValue(16, tempvalue);
</Custom On Equip Eval>

<Custom On Remove Equip Eval>
var tempvalue = $gameVariables.value(16);
tempvalue = tempvalue - 1;
$gameVariables.setValue(16, tempvalue);
</Custom On Remove Equip Eval>


if I replace the number there with 100 and increase the "tempvalue" + and - amount accordingly, is that all I need to do? But I don't want it to be a temporary variable change, I want it to stay until I unequip.

Thanks for the help!

EDIT: This plugin is not allowing my game to run, so I guess I'm at square one...

Closing at OP's request.

Original thread: https://forums.rpgmakerweb.com/threads/equip-change-variable-need-code-help.111412/