Add function call / plugin command to run file with script block(Solved)

Hello!

Seems my code was faulty, unfortunately I assumed that the plugin manager would still add it and run it. But apparently if there is a faulty line you can't call the command at all. Good to know.

I have a question that is rather easy. I am still doing research trying to figure it out myself. But if someone can help me I would love that.

I have a plugin file that contains a long script block and I want to call in the game by calling skillFull(). However, it is not working.

The plugin is put in the plugin manager and is set to on.

This is how it looks at the moment within the .js:

/*Desc*/
skillFull = function() {
script1; script2;
script3; script3;
script5; script6;
}

This seems to work with another plugin I have, but I do not know why it doesn't work with this... It seems to be an error with the code. Is there like a code limit?

I can do it with a plugin command but prefer script as it makes it a bit easier to implement.

Best regards,
my first guess is if you have checked if the plugin name is correct?
the plugin filename becomes part of the plugin data structure, that is why a lot of plugins break if their files are renamed.
I know that if there's some sort of compile error in the code it throws an error in the console and then doesn't load the script. Found that one the hard way when I was testing RETRO. Had a bad line in my latest test, so it didn't load, and then every MZ plugin I had afterward was failing because the functions provided by RETRO weren't loaded, because the error had aborted loading RETRO at all. Annoyingly, it only shows the error in the console, not on the screen. The error I DID see was only from an MZ plugin trying to call a function that then didn't exist, not from the problem that aborted RETRO. So unless something else tries to use a function provided by the script in question, you'll never see the error unless you open the console.
I know that if there's some sort of compile error in the code it throws an error in the console and then doesn't load the script. Found that one the hard way when I was testing RETRO. Had a bad line in my latest test, so it didn't load, and then every MZ plugin I had afterward was failing because the functions provided by RETRO weren't loaded, because the error had aborted loading RETRO at all. Annoyingly, it only shows the error in the console, not on the screen. The error I DID see was only from an MZ plugin trying to call a function that then didn't exist, not from the problem that aborted RETRO. So unless something else tries to use a function provided by the script in question, you'll never see the error unless you open the console.
Yeah, I was expecting there to be some kind of debug message, but there wasn't. But as the title says I managed to solve it. Certain lines of code didn't write in a value, so it looked like:
$dataSkills[1298].effects[0].dataId = : 0;
it should be:
$dataSkills[1298].effects[0].dataId = X : 0;

But I solved it and made it functional again.

Best regards

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/add-function-call-plugin-command-to-run-file-with-script-block-solved.137900/