Every time I do a battle test with this, it works fine until the aftermath; after it calculates the EXP gain, it CTDs with the error at line 445 (bolded here):
#--------------------------------------------------------------------------
# overwrite method: self.gain_exp
#--------------------------------------------------------------------------
def self.gain_exp
$game_party.all_members.each do |actor|
temp_actor = Marshal.load(Marshal.dump(actor))
actor.gain_exp($game_troop.exp_total)
next if actor.level == temp_actor.level
SceneManager.scene.show_victory_level_up(actor, temp_actor)
set_victory_text(actor, :level)
wait_for_message
end
end
I have not altered the script in any way, shape, or form, and I'm not using any other scripts that affect leveling up or post-victory stuff. What's going on, and how can I fix it?
As usual, the error report misses the most important thing, the error message itself. Kindly provide that too, we can't just start guessing what the error is.
Or can we?
Let me guess... The error is something like this:
"TypeError occured.
No marshal_dump is defined for class Fiber/Proc."
Which can only mean that you use a custom battle script, or that some other script stores a Fiber/Proc within a battler object (or both). I remember seeing this error with Theo's SBS, for example.
I will wait for the details, because if that is the error message you get, the fix can be pretty hard to make.
Ohh, it was a long time ago when I saw that error, around 1 and a half year ago, if I remember right, no idea if you updated your battle system since then.
I know that it took a while to figure out where the Fiber object came from, but once that's tracked down, it's easy to remove it.
You guys were right, this is the error, sorry about that:
"TypeError occured.
No marshal_dump is defined for class Fiber/Proc."
I've looked through every single custom script I have and aside from this one not one of them even has the WORD "fiber" or "proc" anywhere within it, at least as far as I could find. Here's all the non-vanilla scripts I'm using, in order from top of list to bottom:
Victor Engine Basic Module
Victor Engine Incapacitate States
Victor Engine Terrain States
Victor Engine Pixel Movement
Victor Engine Moving Platform
Victor Engine Free Jump
Victor Engine Custom Collapse
YEA Core Engine
YEA Message System
YEA Extra Param Formulas
YEA Party System
YEA Battle Engine
Reedo's Simple Side Battle System
YEA Elemental PopUps
YEA Cast Animations
YEA Victory Aftermath
I'm not familiar with Victor's script, so idk about that. But I looked up at RSSBSACE, the author pointed out that it used to have issues with Yanfly Victory Aftermath, and had been fixed in version 1.7a. Maybe, you're using an older version?
Try to diagnose. Press CTRL + SHIFT + F, type "Fiber.new", and see where it pointed out (aside from Game_Interpreter and Window_Message).
Seeing that sideview battle script, I'm pretty sure that the error message you get is NOT what I wrote, therefore NOT what you just wrote.
There is a reason why we need the exact error message, not just something similar.
It is not a Fiber or Proc object for you, your issue is caused by Sprite and Bitmap objects created in that awfully written (sorry, but it's true) sideview battle script you are using. It creates a Game_Character object inside the actor objects, and inside those character objects, it creates Sprite and Bitmap objects. Talk about over-complicating things. 😀
Sprites and bitmaps can not be dumped (just like fibers and procs), and they are not deleted by the time when the victory aftermath script tries to dump the actor objects, hence you get the error.
The entire visual part of that sideview battle script should be rewritten to fix this, since you can't just dispose the sprites and bitmaps causing the issue, because your actors in battle would be disappearing if you do.
I suggest you try to find another sideview battle script, there are a good few of them around, and they are written in a more appropriate way (code-wise).