MV The removeState command is undefined using Shaz's State Add/Remove Commands plugin.

So idk if I'm being a complete idiot right now or what but if I use the "onadd: removeState(5)" command trying to remove the 5th state when a state is being applied everytime that state is applied it gives an error saying that "removeState is undefined". Like I said, I'm probably being stupid and doing something wrong so if someone could point me in the right direction that would be really appreciated.
we need to see a screenshot of the console for that error message before we can help.

this is especially because it is likely from your description that you misread what the error message said.
Because what is undefined is usually the object the function is called on - either the target where the state is to be removed from, or the state itself does not exist.

so we need to see how you used the command (screenshot of event or database entry or whatever) and the screenshot of the full error message.
we need to see a screenshot of the console for that error message before we can help.

this is especially because it is likely from your description that you misread what the error message said.
Because what is undefined is usually the object the function is called on - either the target where the state is to be removed from, or the state itself does not exist.

so we need to see how you used the command (screenshot of event or database entry or whatever) and the screenshot of the full error message.
Spoiler: screenshots
onadd error1.png
onadd error2.png

2 more reasons I thought could be affecting this would be the fact that state 5 isn't currently in effect so maybe I need to have the command check if that state is applied, or maybe my plugins are ordered incorrectly.
1) Do NOT, and not under any circumstances ever, rename the plugin files.
And especially NEVER use SPACES in filenames used in HTML5-based games.

You see those %20 in the filename in the error messages? That is the replacement for spaces because a browser can't handle spaces directly, they always have to be replaced even in error messages.

Please rename the file and install it with the correct name

2) There is a very high probability that you got the notetag wrong - eval type notetags usually have a start and an end sequence because they can get over multiple lines.
I suggest you give us a link to the website you got the plugin from so that we can read what you're supposed to write there.
i dont know about shaz's plugins but you have yanfly buff and state core from the looks of it.
this is a state notetag from that plugin

<Custom Apply Effect>
user.removeState(X)
</Custom Apply Effect>

X being the state ID for the state you want to remove when this state gets added.

i have this for things like regen state removes poison and vise versa
i dont know about shaz's plugins but you have yanfly buff and state core from the looks of it.
this is a state notetag from that plugin

<Custom Apply Effect>
user.removeState(X)
</Custom Apply Effect>

X being the state ID for the state you want to remove when this state gets added.

i have this for things like regen state removes poison and vise versa
Yeah that ended up working. I tried doing that earlier but without the "user." part of the command and it wouldn't work. Thanks! That was an easier fix than I made it out to be.

Original thread: https://forums.rpgmakerweb.com/threads/the-removestate-command-is-undefined-using-shazs-state-add-remove-commands-plugin.140369/