VE Actors Battlers Error Crash (im at the end of my game, please help)

Whenever I try and change a party member during a boss fight (one of them sacrifices their selves)

 

I get an error for line 559 in VE actors battlers script (the one in bold) and it crashes.

 

It may be because im using Victor script with yanlfys party system.

 

Is there any way i can fix this?

 

 

 

 

 #--------------------------------------------------------------------------

  # * New method: update_party

  #--------------------------------------------------------------------------

  def update_party

    @actor_sprites.each_index do |i|

      next if $game_party.battle_members.include?(@actor_sprites.battler)

      @actor_sprites.dispose

      @actor_sprites = nil

    end

    $game_party.battle_members.collect do |actor|

      next if @actors_party.include?(actor)

      @actor_sprites.push(Sprite_Battler.new(@viewport1, actor))

    end

    @actor_sprites.compact!

    @actors_party = $game_party.battle_members.dup

    $game_party.battle_members.each do |actor|

      old_position = [actor.screen_x, actor.screen_y]

      actor.default_direction if $imported[:ve_animated_battle]

      if old_position != [actor.screen_x, actor.screen_y]

        sprite(actor).start_effect🙂appear) 

      end

    end

  end

end
The error message would be helpful, along with links to both scripts. Sometimes the problem is not with the line that's reported during the crash.


If the error message says something like default_direction method doesn't exist for actor I'd question whether you've added a script and are playing from a saved game made prior to adding the script. If it says something about nil actor, then that doesn't seem right either, as I'd expect it to error on the line above.
ve actors battlers

http://dl.dropboxusercontent.com/u/27014140/Scripts/Victor%20Engine%20-%20Actors%20Battlers.txt

yanfly party system

http://dl.dropboxusercontent.com/u/49701990/YEA/Party_System.rb

ERROR:

Script 've actors battlers' line 559: NoMethodError occurred,

undefined method 'default_direction' for

<#Game_Actor😮xa4c6710>

It happens when a member is changed or removed during battle. Even with a new game (not an old save)
Most battle system scripts initialise the actors on battle-start, that's why summoning skills have so many problems (the new actors aren't initialised if they are added during combat, after battlestart).


My best guess is that this is something similiar - if it happens when the actor is changed, then it's probably that the new actor wasn't initialised at start.


If it happens after removing an actor, then the battlescript most likely stored the original actor list in its own way and is suddenly missing one of the battlers that it expects to be there based on the battle-start-list.


Any way to change your battle by giving the actor a "sacrified" state (which blocks all actions) and removing it only after battle?


Because otherwise, you have to first find the place where the script stores the initialization data and then change that data the moment you change the actor...
Thanks. I couldnt get a state to keep her out of battle. But i did manage to show her dying and then aborting the battle leading to a cut scene that that removes her and then goes back to battle. I guess its the price i have to pay to have an awesome battle script and a party script.

Original thread: https://forums.rpgmakerweb.com/threads/ve-actors-battlers-error-crash-im-at-the-end-of-my-game-please-help.21345/