MZ VisuStella Item is Not Defined Bug

Hi all,

I'm a relative newbie to using Plugins on RPG Maker MZ - I've installed the VisuStella Tier 0 and Tier 1 plugins, and am continuously getting an 'Item not defined' bug when battle testing. I don't know DevTools well enough to work out what the problem is. Can anyone help? The console text for the bug (or at least the last one) is below. Any help really appreciated, since I've no idea what I'm doing!

rmmz_managers.js:2032 ReferenceError: item is not defined
at Game_Actor.eval (eval at VisuMZ.<computed> (VisuMZ_1_SkillsStatesCore.js:1), <anonymous>:12:20)
at Game_Actor.Game_BattlerBase.<computed>.<computed> [as paySkillCost] (VisuMZ_1_SkillsStatesCore.js:3081)
at Game_Actor.Game_Battler.useItem (rmmz_objects.js:3820)
at Game_Actor.Game_Battler.<computed>.<computed> [as useItem] (VisuMZ_1_OptionsCore.js:1655)
at Function.BattleManager.startAction (rmmz_managers.js:2746)
at Function.BattleManager.processTurn (rmmz_managers.js:2661)
at Function.BattleManager.updateTurn (rmmz_managers.js:2616)
at Function.BattleManager.updatePhase (rmmz_managers.js:2351)
at Function.BattleManager.update (rmmz_managers.js:2338)
at Function.BattleManager.<computed> [as update] (VisuMZ_0_CoreEngine.js:8886)
Well, it's saying it's coming from eval, so it seems like you have some invalid code in a notetag involving the word item.
and that notetag is most likely either in an item, a skill or a state as the errors come through skillstatescore.

you should check all the notetags on all your items, skills and states for use of the word item, then check if you can see a simple typo anywhere there.

If not you'll have to start pinpointing it by what you tried to use before the error and/or temporarily removing notetags until you can at minimum tell which notetag is wrong.

then we could help further if you can't see the error, just place a screenshot of the object and its notetag. We just can't go through dozens of notetags for you to find the one that is wrong...
Super helpful - thanks both. Just knowing this was about a notetag and Skillstatecore has, I think, helped me eliminate this bug. Curiously, though, I don’t think it was the word ‘item’ - I had wrong used the <Category> notetag, rather than <Resist State Category> on multiple enemies. Could that have been the issue? It seems to have made the problem go away. But I shall also do as you suggest and search for the word item amongst other note tags to make sure.
No, the word item could have been in the actual line of code, but the improper notetag caused the skill to not be correctly recognized.
Ok, I've worked out what is causing this problem - but I can't work out why. VisuStella Skills and States is mean to enable you to have Item Costs for skills, with the Notetag

<Item Cost: x name>

So I've used this in the Notetag of a few skills. Yet it seems that this is what is making the battletest crash. I've got the Skills and States plugin installed. Any idea what could be going wrong?
There's no way we could have an idea without knowing what you've actually typed in your notetags. You'll need to show a screenshot of the skills and the items you're trying to make it cost.
Thanks. This, for example? The Plugin clearly is correctly registering the Item Cost - because it is correctly listing the item cost for the skill in the battletest (i.e. it shows the 1x Icon next to the MP cost). It seems to be that when the system comes to process the cost, it crashes. And the item in this case ('Antidote') does exist in my database, spelled the same way etc.
Here's what it looks like in the Battletest. So we seem to be fine at this point - and I can select the skill. But when it comes to the skill being used, the battletest crashes.
I've solved the problem! So thanks for your help in identifying what the problem was. It turns out that this was actually a problem in version 1.39 of the Plugin. I just checked and found a new 1.40 version from two days ago, and they note that they corrected this problem in the update notes. But I would have had no idea to look for this without knowing it was something to do with 'Item' in the notetags. So thanks!
Just one additional comment/warning:
what is making the battletest crash.

The battletest speeds up the process by skipping part of the game initialisation.
However there are some plugins that need the new game setup of a full playtest.

So if something crashes battletest, always test first if the same crash happens on a new game in playtest. Sometimes the battletest crashes are not true errors but due to the missing setup.
Brill, thanks.

Original thread: https://forums.rpgmakerweb.com/threads/visustella-item-is-not-defined-bug.160372/