can someone help me fix this script

I'm having a bit of a dilemna right now because I can't figure out how to fix this script.


Found a tutorial and so far everything works but Ican't fight. The minute my character hits something the error message shows up and it just stops the test. I tried battling earlier and it worked fine, I believe that was before I put in this script


This is the script it showed me, I haven't tried scripting yet so I'm at a loss for what's wrong

FB_IMG_1455287442334.jpg

FB_IMG_1455287438681.jpg
I suggest you follow the link "how to use a script" in my signature.


An error like that usually either means that you copied the script wrong, or that you loaded an incompatible savefile instead of starting a new game.


Additionally, can you please link to the script (where you got it from)?


Besides, if that script is there to add affects to the skill user, then you're better off without it - it's much easier to place the effects for the user into the skill damage formula, there is a topic about that here in the forum.
I suggest you follow the link "how to use a script" in my signature.


An error like that usually either means that you copied the script wrong, or that you loaded an incompatible savefile instead of starting a new game.


Additionally, can you please link to the script (where you got it from)?


Besides, if that script is there to add affects to the skill user, then you're better off without it - it's much easier to place the effects for the user into the skill damage formula, there is a topic about that here in the forum.

Its part 3.5 of this group of tutorial.


https://www.rpgmakerweb.com/support/products/tutorials
Its part 3.5 of this group of tutorial.

Then forget it completely - unfortunately there was a bug in the included script, and it was corrected only at one of the two download positions for the file.


If you downloaded from the wrong position, the script itself is defective.


And later no one bothered to correct it because as I said above, it's a lot easier to do the same without scripts in the damage formula.




The topic is very long and it contains dozens of questions and answers, including how to make self-effects. Read the forum one, not the linked blog - much of the answers are only on the forum
You can try to enter these lines right above the reported line:


next if scan.nil? || scan[0].nil?


In theory, this should fix that script.

Original thread: https://forums.rpgmakerweb.com/threads/can-someone-help-me-fix-this-script.56747/