I am using Yami's Predicted Charge Turn Battle script which can be found here.
Everything works as expected - unless an enemy is killed by a counter attack. The game then crashes with this error message.

This happens even in a New Game.
The line of script being referred to is here:
with the culprit line being
@subject.last_obj = @subject.current_action.item unless @subject.last_obj
This seems to indicate definitively that it is the fact that the enemy has died that is causing the problem, as it is the last object.
Can anyone see a solution to this?
Thank you.
Everything works as expected - unless an enemy is killed by a counter attack. The game then crashes with this error message.

This happens even in a New Game.
The line of script being referred to is here:
Code:
# alias method: execute_action
#--------------------------------------------------------------------------
alias scene_battle_execute_action_pctb execute_action
def execute_action
scene_battle_execute_action_pctb
unless BattleManager.action_forced?
@subject.last_obj = @subject.current_action.item unless @subject.last_obj
end
end
@subject.last_obj = @subject.current_action.item unless @subject.last_obj
This seems to indicate definitively that it is the fact that the enemy has died that is causing the problem, as it is the last object.
Can anyone see a solution to this?
Thank you.

