RESOLVED! Error Related to 'Skill Cost Items' Plugin

Hello and forgive my naivety as I'm not well-versed with scripting. I'm running RMMV v. 1.6.2 and I'm using Yanfly's 'Skill Cost items' Plug-in and I'm getting this error as soon as I begin an attack during a battle, during test play:

"TypeError
require(...).Window.get(...).isDevToolsOpen is not a function"


When I press F8, I get two error messages:

YEP_X_SkillCostItems.js:1045 ACTION SEQUENCE IF CONDITION ERROR
YEP_X_SkillCostItems.js:1046 user.attackMotion() !== ‘missile’
YEP_X_SkillCostItems.js:1047 SyntaxError: Invalid or unexpected token
at Function.BattleManager.actionIfConditions (YEP_BattleEngineCore.js:2795)
at Function.BattleManager.processActionSequenceCheck (YEP_BattleEngineCore.js:2305)
at Function.BattleManager.updateActionTargetList (YEP_BattleEngineCore.js:2263)
at Function.BattleManager.update (YEP_BattleEngineCore.js:1938)
at Scene_Battle.updateBattleProcess (rpg_scenes.js:2265)
at Scene_Battle.update (rpg_scenes.js:2257)
at Scene_Battle.update (YEP_CoreEngine.js:1259)
at Scene_Battle.update (YEP_BattleEngineCore.js:4570)
at Function.SceneManager.updateScene (rpg_managers.js:2024)
at Function.SceneManager.updateMain (rpg_managers.js:1983)
Yanfly.Util.displayError @ YEP_X_SkillCostItems.js:1047
rpg_managers.js:1949 TypeError: require(...).Window.get(...).isDevToolsOpen is not a function
at Object.Yanfly.Util.displayError (YEP_X_SkillCostItems.js:1049)
at Function.BattleManager.actionIfConditions (YEP_BattleEngineCore.js:2798)
at Function.BattleManager.processActionSequenceCheck (YEP_BattleEngineCore.js:2305)
at Function.BattleManager.updateActionTargetList (YEP_BattleEngineCore.js:2263)
at Function.BattleManager.update (YEP_BattleEngineCore.js:1938)
at Scene_Battle.updateBattleProcess (rpg_scenes.js:2265)
at Scene_Battle.update (rpg_scenes.js:2257)
at Scene_Battle.update (YEP_CoreEngine.js:1259)
at Scene_Battle.update (YEP_BattleEngineCore.js:4570)
at Function.SceneManager.updateScene (rpg_managers.js:2024)


I'm using the following added plugins(ALL up to date.) and they are in the following order in the Plugin Manager:

-YEP_CoreEngine
-YEP_BattleEngineCore
-YEP_X_ActSeqPack1
-YEP_X_ActSeqPack2
-YEP_X_ActSeqPack3
-YEP_SkillCore
-YEP_X_SkillCostItems
-YEP_WeaponAnimation
-YEP_QuestJournal


When I disable 'Skill Cost Item' in the Plugin Manager, everything works fine. When I turn it on, the error reoccurs even if I'm not using characters that have skills with 'Skill Cost Item' notetags. I also have not modified the script in any way and I also completely deleted it and re-downloaded/installed a fresh 'Skill Cost Item' file. Any help is greatly appreciated! Thanks!
Just a heads up. Please don't put everything in bold. When everything is emphasised the actual emphasis is lost.
Thanks.
Some battle plugins only work when you're playing the game, not when you're running battle test
Could be mismatched characters, maybe check the user.attackMotion() !== 'missile' line in your action sequence? JavaScript expects 'neutral' "quote marks" rather than ‘open/close’ ones. A subtle difference, but it's a common auto-format thing sites/apps do that messes up code snippets. 😔

Otherwise, things to check:
  1. Did you save your project before battle-test?
    The editor only forces you to save before play-test. If you don't save then your plugin changes won't be recognised.
  2. Are your Yanfly plugins up-to-date?
    This error is typical of outdated Yanfly plugins as mentioned here: http://yanfly.moe/2018/08/27/lots-of-plugin-updates/
  3. Are your actual project files up-to-date?
    If you're unsure, use a text editor (Notepad will suffice) to open your project's rpg_core.js file (found in the js folder). The version number should be on the second line, e.g. for me it reads:
    Code:
    //=============================================================================
    // rpg_core.js v1.5.2
    //=============================================================================
    If your project files are outdated then you'll need to manually update them. Instructions can be found in this announcement: https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-mv-v1-6-1-stable-release.96715/
Could be mismatched characters, maybe check the user.attackMotion() !== 'missile' line in your action sequence? JavaScript expects 'neutral' "quote marks" rather than ‘open/close’ ones. A subtle difference, but it's a common auto-format thing sites/apps do that messes up code snippets. 😔

Otherwise, things to check:
  1. Did you save your project before battle-test?
    The editor only forces you to save before play-test. If you don't save then your plugin changes won't be recognised.
  2. Are your Yanfly plugins up-to-date?
    This error is typical of outdated Yanfly plugins as mentioned here: http://yanfly.moe/2018/08/27/lots-of-plugin-updates/
  3. Are your actual project files up-to-date?
    If you're unsure, use a text editor (Notepad will suffice) to open your project's rpg_core.js file (found in the js folder). The version number should be on the second line, e.g. for me it reads:
    Code:
    //=============================================================================
    // rpg_core.js v1.5.2
    //=============================================================================
    If your project files are outdated then you'll need to manually update them. Instructions can be found in this announcement: https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-mv-v1-6-1-stable-release.96715/

Thanks for your help. So I did everything above as mentioned. The only thing that I missed was to update the 'Core Engine'. Now I'm getting this message which is triggered the same way:


YEP_CoreEngine.js:1094 TypeError: require(...).Window.get(...).isDevToolsOpen is not a function
at Object.Yanfly.Util.displayError (YEP_X_SkillCostItems.js:1049)
at Function.BattleManager.actionIfConditions (YEP_BattleEngineCore.js:2798)
at Function.BattleManager.processActionSequenceCheck (YEP_BattleEngineCore.js:2305)
at Function.BattleManager.updateActionTargetList (YEP_BattleEngineCore.js:2263)
at Function.BattleManager.update (YEP_BattleEngineCore.js:1938)
at Scene_Battle.updateBattleProcess (rpg_scenes.js:2265)
at Scene_Battle.update (rpg_scenes.js:2257)
at Scene_Battle.update (YEP_CoreEngine.js:1427)
at Scene_Battle.update (YEP_BattleEngineCore.js:4570)
at Function.SceneManager.updateScene (rpg_managers.js:2024)

I noticed yanfly's scripts are all updated for RMMV v. 1.6.1... my RPG_core.js is v. 1.6.1. but the 'About' says I'm using 1.6.2. Could this be the issue? If so, is there a way to downgrade to the stable 1.6.1.?
Versions 1.6.1 and 1.6.2 have identical code, so that shouldn't be a problem. 😮‍💨

Should've just asked this before, but does the action sequence work OK without that "if" line? If so, it's almost certainly a problem with the quote marks as I mentioned, and I'd suggest trying this instead:
Code:
if user.attackMotion() !== 'missile'

Still not sure why the isDevToolsOpen error would appear if you've updated your files correctly, though. Did you remember to copy over the libs folder (found inside the js folder) as well? People tend to forget that one, but it's pretty important. 😅

In case you're interested, an alternative way to update is to make a new project, then copy the following from your current project to that new project:
  • Folders: audio, data, icon, img, fonts, movies (resources and map/database stuff);
  • The plugins folder should be copied over too;
  • And the plugins.js file found in the js folder (this stores your Plugin Manager settings).
Then you can try the new project to see if the same error occurs.
Versions 1.6.1 and 1.6.2 have identical code, so that shouldn't be a problem. 😮‍💨

Should've just asked this before, but does the action sequence work OK without that "if" line? If so, it's almost certainly a problem with the quote marks as I mentioned, and I'd suggest trying this instead:
Code:
if user.attackMotion() !== 'missile'

Still not sure why the isDevToolsOpen error would appear if you've updated your files correctly, though. Did you remember to copy over the libs folder (found inside the js folder) as well? People tend to forget that one, but it's pretty important. 😅

In case you're interested, an alternative way to update is to make a new project, then copy the following from your current project to that new project:
  • Folders: audio, data, icon, img, fonts, movies (resources and map/database stuff);
  • The plugins folder should be copied over too;
  • And the plugins.js file found in the js folder (this stores your Plugin Manager settings).
Then you can try the new project to see if the same error occurs.
Awesome! Removed that “if” line. Issue resolved! Thanks for helping me!
if your issue is resolved, report your first post and let the mods know, and they'll close the thread for you.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/resolved-error-related-to-skill-cost-items-plugin.106989/