BGS Problem with Game_Interpreter

Hi everyone,

I actually have a big problem with my project and the only thread I found about it was from 2014 and was not solved...

When I try to run a BGS in an event (i.e. Autorun Event that play a BGS via ''Play BGS...'' option in the second tab of event commands), an error appeared that says.

''game_interpreter argumenterror occurred: line 1011
wrong number of arguments (4 for 3)''

I didn't have any scripts in my project, it's a new one. If I remove the ''Play BGS'' in my event, everything is fine. Can someone help me please?
That error can only happen if something changed the code of a script, in this case the code that executes that sound command.

You need to find out where the scripts where changed and repair them.
Line 1101 of Game_Interpreter has nothing to do with playing BGS - it's a battle command. And the Play BGS command doesn't have any arguments.

So there HAS been a change made to your scripts.

How old is your VX Ace? What version is it (Help > About RPG Maker VX Ace)? Where did you get it from?

Try to create a new project again, and get the Scripts.rvdata file from the data folder, and copy it into your current project's data folder. See if it makes a difference.
Ok, just found I put Scripts from my old project in my new one, sorry for this, I was sure it was a completly new one (didn't touch RPG Maker for years haha)
I buy it via Steam, so it's up to date. The battle Script I have is ''Jet's Viewed Battle System''. But I never had problem with it, only when I play BGS right after the battle via Autorun Events.

For reference, my Lines 1007 to 1012 are :
#----------------------
# * Play BGS
#----------------------
def command_245
@params[0].play
end
Please follow the link "how to use a script" in my signature to the bughunting section, install the backtracer and give us a screenshot of that scripts console output at the error.
Additionally, we need a link to the Website where you got the scripts that you're using.
Because giving only the error line itself will never solve the problem.
You have other scripts that have messed things up. As you can see, your error message says there are 4 arguments but there are supposed to be 3. My guess is you also have a script change for the BGS and/or audio functions.

If you want a fresh project, start a brand new one and copy the Scripts file across. Then add the ones you NEED, not the ones you thought you needed for the previous project.
You have other scripts that have messed things up. As you can see, your error message says there are 4 arguments but there are supposed to be 3. My guess is you also have a script change for the BGS and/or audio functions.

If you want a fresh project, start a brand new one and copy the Scripts file across. Then add the ones you NEED, not the ones you thought you needed for the previous project.

It's what I did, start a brand new project and transfert all scripts in the new one, I don't have any script about music or BGS (I think), I will provide a complete list as soon as I can, but for the websites, I wont be able to give them all, it's been like 1-2 years ago and I didn't keep anything. I can make some researches first though.
No, I didn't say to transfer scripts into the new project. I said transfer them FROM the new project INTO your existing one. Otherwise you're just copying the same buggy scripts into each new project.

Try to create a new project again, and get the Scripts.rvdata file from the data folder, and copy it into your current project's data folder.

Start a new project.
Get the Scripts.rvdata2 file from the new project that you just created
Paste it into the data folder of your current project that is giving you the errors
Ok, so I tried what you said Shaz and it worked (I mean, there is no crash anymore) but I don't have any scripts anymore, so I put back the downloaded files (Non-touched scripts) in my game, and it does the same thing again.

Here's my Scripts List :
-Szyu Crafting System v1.9
-V.M of D.T Sleek Item Popup v1.14a
-Ru Volume Control For RGSS3 (Might be it's fault)
-Yanfly Party System v1.08
-Yanfly Steal Items v1.03
-Yanfly Class System v1.10
-Yanfly Class System Add-On: Class Unlock Level v1.00
-Fomar0153 Smarter Enemy AI v1.0
-Fomar0153 Correction Enemy AI
-Jet's Viewed Battle System
-Fomar0153 Custom Equipment Slots Script
-Yanfly Weapon Attack Replace v1.01
-Yanfly Ace Item Menu v1.02
-Yanfly Slippery Tiles v1.00
Celestian Multiple Currencies v1.1
-Hime Shop Manager
-Hime Shop Stock
-Venka's Bestiary v1.8
-modern algebra Quest Journal v1.0.3
-Dekita $D13x Core v2.7
-Dekita $D13x Item Pack v1.0
-Dekita $D13x Statistic Control v1.8
-Dekita $D13x Skill Levels v1.8
-Dekita $D13x Proficiency (skills) v1.1
-Dekita $D13x Skill Scene v1.8
-Yanfly Ace Core Engine v1.09
-Zalerinian Scriptbox Error Info v2.0.0

It's old files I donwload a couple of months/years ago, I didn't keep any websites, but if it's important, I can search through the net.
Hope it'll help solving the problem. Thanks.
Remove the scripts again, then add them one after another and test after each script if the error is back. You need to identify which scripts are involved before you can solve this.

Follow the link "how to use a script" in my signature for more details on bughunting Insider script editor.
You also got your Yanfly scripts out of order for starters. Go to the website and put them in the order listed. Core Engine *must* go first.

Also that is a huge mess of scripts by different authors. Try posting only the scripts by one author first, and if those work, add the others one at a time, test, and see which one causes the crash. Also you can install the backtrace script by Hime to get a more detailed error report (recommended, as then you can see what order things are being called in).
I am looking at the volume control script. Put the others in order, disable that one, and see if the problem is solved. If it works okay, enable that one, but put it right at the bottom of all your scripts.
Ok, I have good news, I've done pretty much everything you said.
I did put back all scripts by author, run the game one author at the time, and found the culprit.
I also reorganize every scripts by author with Core scripts first in the list.
It was the Volume Control Script. I did just remove it and control the volume directly in my desktop mixer instead. Thanks for all the help!

Original thread: https://forums.rpgmakerweb.com/threads/bgs-problem-with-game_interpreter.85909/