I'm using "YSA Battle System: Predicted Charge Turn Battle" (I copied the version of the script in this topic). I also have other scripts; but the same issue happens when I copied this script alone into a new project.
When a party member is knocked out by an enemy's counterattack, this error comes up:
Script 'PCTB' line 815: NoMethodError occurred.
undefined method 'item' for nil:NilClass
(Nothing untoward happens when a party member takes damage from a counterattack without being knocked out, or when a party member is knocked out by a normal attack.)
Line 815 reads:
@subject.last_obj = @subject.current_action.item unless @subject.last_obj
When a party member is knocked out by an enemy's counterattack, this error comes up:
Script 'PCTB' line 815: NoMethodError occurred.
undefined method 'item' for nil:NilClass
(Nothing untoward happens when a party member takes damage from a counterattack without being knocked out, or when a party member is knocked out by a normal attack.)
Line 815 reads:
@subject.last_obj = @subject.current_action.item unless @subject.last_obj