Error upon launching playtest: Unexpected token #

I'm getting this error the instant I launch the playtest and I have no idea how to fix it

 

Spoiler
/C:/Users/starw/Documents/Games/AHTDS/js/plugins/mv_heal_on_level_up.js:35 Uncaught TypeError: Cannot read property 'toUpperCase' of undefined
index.html:1 Uncaught SyntaxError: Unexpected identifier
rpg_managers.js:1692 Uncaught SyntaxError: Unexpected token #
rpg_managers.js:1693 file:///C:/Users/starw/Documents/Games/AHTDS/index.html?test 1
index.html:1 Uncaught SyntaxError: Unexpected token #
It is saying there's something wrong with the mv_heal_on_level_up script.  Please provide a link to the script.


If it's MY plugin, you've given it the wrong name, and that could be enough to cause it.  My plugin should be saved as HealOnLevelUp.js, not as mv_heal_on_level_up.js


Also ensure you've set up the plugin parameters correctly.  Set them as Y or N.  Don't leave them blank.
I thought that was your plugin?

http://forums.rpgmakerweb.com/index.php?/topic/47137-heal-on-level-up/



May I upload the plugin here so you can see if its yours?
I added more to my post.  Please re-read.
Well that only fixed one of the issues but the main issue persists:

 

Spoiler
index.html:1 Uncaught SyntaxError: Unexpected identifier
rpg_managers.js:1692 Uncaught SyntaxError: Unexpected token #
rpg_managers.js:1693 file:///C:/Users/starw/Documents/Games/AHTDS/index.html?test 1
index.html:1 Uncaught SyntaxError: Unexpected token #
That's a different issue.  What's on rpg_managers.js line 1692?


Have you modified any of the default .js files?
That's a different issue.  What's on rpg_managers.js line 1692?


 console.error(e.message);

I have no idea why this issue is occurring all of a sudden I was messing with Yanfly's main menu manager before this happened but there is absolutely no way that plugin could've caused the issue in the first place..
I don't really understand what's going on here, but it's saying there's an error in this file (I think):  [COLOR= rgb(39, 42, 52)]rpg_managers.js:1693 file:///C:/Users/starw/Documents/Games/AHTDS/index.html?test 1[/COLOR]


Can you open index.html in an editor and see if anything looks weird?  If you don't know, copy the first few lines and paste here.
Spoiler
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
        <meta name="viewport" content="user-scalable=no">
        <link rel="icon" href="icon/icon.png" type="image/png">
        <link rel="apple-touch-icon" href="icon/icon.png">
        <link rel="stylesheet" type="text/css" href="fonts/gamefont.css">
        <title>AHTDS</title>
    </head>
    <body style="background-color: black">
        <script type="text/javascript" src="js/libs/pixi.js"></script>
        <script type="text/javascript" src="js/libs/fpsmeter.js"></script>
        <script type="text/javascript" src="js/libs/lz-string.js"></script>
        <script type="text/javascript" src="js/rpg_core.js"></script>
        <script type="text/javascript" src="js/rpg_managers.js"></script>
        <script type="text/javascript" src="js/rpg_objects.js"></script>
        <script type="text/javascript" src="js/rpg_scenes.js"></script>
        <script type="text/javascript" src="js/rpg_sprites.js"></script>
        <script type="text/javascript" src="js/rpg_windows.js"></script>
        <script type="text/javascript" src="js/plugins.js"></script>
        <script type="text/javascript" src="js/main.js"></script>
    </body>
</html>
That looks okay - I was expecting some invalid characters/commands in there.


Had you only just added the menu manager?  If you disable that plugin altogether, does the error go away?  When you say you were "messing" with it, do you mean you were just changing the parameters, or were you actually changing the .js code?
That looks okay - I was expecting some invalid characters/commands in there.


Had you only just added the menu manager?  If you disable that plugin altogether, does the error go away?  When you say you were "messing" with it, do you mean you were just changing the parameters, or were you actually changing the .js code?

 
I've had it for a good while, error does not go away. I was changing the parameters. Specially the Menu 98, Menu 99, and Menu 100 parameters.
When you renamed my plugin, did you delete the old entry and add the new entry?  Any chance you've got my plugin in there twice now, with two different names?



if you disable the heal on level up plugin, does it still happen?
When you renamed my plugin, did you delete the old entry and add the new entry?  Any chance you've got my plugin in there twice now, with two different names?



if you disable the heal on level up plugin, does it still happen?


The entry is in there only once. I did make sure to delete the old and add in the new. Error persists.
I'm not sure what the problem is.


Are you able to zip up your data and js folders and load them up somewhere and give me a link?  I should be able to reproduce it with just those two, hopefully.


Otherwise you'll need to wait for someone with more experience with MV to come along.
I'm not sure what the problem is.


Are you able to zip up your data and js folders and load them up somewhere and give me a link?  I should be able to reproduce it with just those two, hopefully.


I figured out the issue already. It was this plugin:

http://forums.rpgmakerweb.com/index.php?/topic/51575-ssg-difficulty-setting/
weird ...
weird ...


It most likely has to do with the fact I replaced the actual switch numbers in the required JSON file with the pound sign (#). Hence the error.
ah, that sounds like it might do it.  I knew there had to be a # in there somewhere!


Glad you've figured it out 🙂
ah, that sounds like it might do it.  I knew there had to be a # in there somewhere!


Glad you've figured it out 🙂


Thank you for your help.

I still wonder why the error did not occur sooner. Shouldn't it have occurred immediately upon the first time I launch Playtest after installing the plugin?
tbh I don't really know.  I seem to recall something about a cache, but I thought that's if you played through the browser (by opening the index.html file), not by hitting play test.


It should have happened the first time you did a play test after adding the plugin AND changing the file with the #.  Maybe you didn't actually save the file when you originally made the change?


I'd just put it down as one of life's great mysteries ...

Original thread: https://forums.rpgmakerweb.com/threads/error-upon-launching-playtest-unexpected-token.61841/