Yeah, you have the right place - wrong topic though, so I split it into its own thread.
With respect to the error, I am not familiar with the script so this may not be correct, but I took a look and saw this:
if $scene.is_a?(Scene_Battle) and ($scene.ctb? or $scene.atb?)
iterate_battler(@params[0], @params[1]) do |battler|
next unless battler.exist?
current_active_battler = $scene.active_battler
$scene.active_battler = battler
$scene.process_action
$scene.active_battler = current_active_battler
end
$game_troop.forcing_battler = nil
end
around the line you mentioned. From what you described, my guess is that when the actor's action is processed, it ends the battle prematurely and sets the scene to Scene_Map, which causes an issue since it does not have a method for active_battler.
So, try replacing that section with the following:
if $scene.is_a?(Scene_Battle) and ($scene.ctb? or $scene.atb?)
iterate_battler(@params[0], @params[1]) do |battler|
next unless battler.exist?
current_active_battler = $scene.active_battler
$scene.active_battler = battler
$scene.process_action
break if !$scene.is_a?(Scene_Battle)
$scene.active_battler = current_active_battler
end
$game_troop.forcing_battler = nil
end
However, there might be a bigger problem, and that is how you are choosing to end the scene. If you are doing it outside the parameters of BEM (for instance, running a script call that just says: $scene = Scene_Map.new) then there will almost certainly be more problems that spring up.