Script Error in Yami Battle Symphony: "Argument Error."

First of all, I'm running the following scripts: 
Yanfly Core Engine 
Yanfly Battle Engine, 
Yami Battle Symphony
Yami Enemy Char Set
Yanfly Victory Menu

The error is in the form of a popup window when I engage in a fight in-game. For your convenience, I'll copy/paste the popup window:

"Script 'Yami Battle Symphony' Line 3160: ArgumentError occured. 

comparison of NilClass with 0 failed"

Line 3160 is this:

"value = [(@screen_x - @destination_x).abs, @move_x_rate].min"

The only thing I've changed is the direction of the party and the actor's locations. I'm using this script for side-view battles. I don't know if this is relevant, but I have set one of the enemies to be an actor. To make that happen, I've added <battler set: GameDev, 0> to the Note section of that character under Enemies, as instructed.

The weird part is that the test battle system in the Database works fine. It's only once I'm in-game that the error message shows up. Can someone please explain the problem or at least tell me how to remedy it? I've looked up guides related to these and those five scripts should be compatable.

Thanks,
-Matt
You'll find it easier to get help for this under script support (as this involves help for an existing script), so I moved it there.


I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Can you post links to the scripts you mention? Not everyone has them readily available.
Did you start a new game or did you load a saved file when the error happened?


Because in 80% of all cases, NIL-errors are caused by incompatible savefiles from before a script was added.


If the error happens on a new game, then we need the full error message from a backtracer script - if you don't have the link to it, follow the "how to use a script" in my signature to learn how to use a backtracer for bughunting
You'll find it easier to get help for this under script support (as this involves help for an existing script), so I moved it there.


I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Can you post links to the scripts you mention? Not everyone has them readily available.

Thanks. Here's a link.


https://github.com/suppayami/rmvxa-collection/blob/master/battle-symphony/battle-symphony-116e.rb

Did you start a new game or did you load a saved file when the error happened?


Because in 80% of all cases, NIL-errors are caused by incompatible savefiles from before a script was added.


If the error happens on a new game, then we need the full error message from a backtracer script - if you don't have the link to it, follow the "how to use a script" in my signature to learn how to use a backtracer for bughunting



At some point after adding scripts I closed down RPGMVXA to restart my computer, so technically I loaded a saved file before the error occurred.
The save file you loaded, was it saved before you added Battle Symphony or after that?


If the save file was made before, that will NOT work, so you can't use ANY save files made prior to adding the battle script.


You must start a new game, than it should work.


If it still doesn't work, than it is a valid error.


It treats @x_move_rate as nil, so I guess, your save file is made before you added the script, otherwise that would be defined.
At some point after adding scripts I closed down RPGMVXA to restart my computer, so technically I loaded a saved file before the error occurred.

I'm not talking about your project files, but about which option you choose at the title screen after starting the game.


As Sixth explained, you cannot use a saved game file that is older than the moment you placed the script in your project.
I'm not talking about your project files, but about which option you choose at the title screen after starting the game.


As Sixth explained, you cannot use a saved game file that is older than the moment you placed the script in your project.

Oh, you meant an in-game save file. I haven't tried that. I've been using one and saving it over time so I don't have to start over every time to check for bugs. I'll try it later today and let you all know.


On a related note, how do I delete save files? I have five or six and some are a year old. I'd like to erase most of them.
Just go to your project's folder and delete the ones you don't need.


Their name will make it clear which ones are save files. The number in their name is the index of save files, it's the order how you see them on the save/load screen in the game.
Likes for everybody! That was the exact problem (using a save file that I made before adding new script). Everything runs fine now!

Original thread: https://forums.rpgmakerweb.com/threads/script-error-in-yami-battle-symphony-argument-error.69435/