Undefined Method Error?

hii so I've been getting crashes after adding some scripts and I don't exactly understand the tracebacks, if anyone could please help me i'd be very happy, thank u

▼ battle engine:3041:in `show_attack_animation': undefined method `atk_animation_id2' for nil:NilClass, NoMethodError

from Scene_Battle:654:in `show_animation'

from ▼ battle engine:3104:in `invoke_item'

from ▼ battle engine:3093:in `block (2 levels) in use_item'

from ▼ battle engine:3093:in `times'

from ▼ battle engine:3093:in `block in use_item'

from ▼ battle engine:3089:in `each'

from ▼ battle engine:3089:in `use_item'

from pbt mechanism:701:in `use_item'

from ▼ battle engine:2990:in `execute_action'

from Battle Control:281:in `process_action'

from Battle Control:246:in `update'

from Scene_Base:14:in `main'

from SceneManager:23:in `run'

from Main:10:in `block in <main>'



- Battle Command List:978:in `on_confirm_cancel': undefined method `index' for nil:NilClass, NoMethodError
from Window_Selectable:212:in `call'
from Window_Selectable:212:in `call_handler'
from - Battle Command List:558:in `process_dir4'
from - Battle Command List:547:in `process_handling'
from Window_Selectable:276:in `update'
from Scene_Base: 95:in `block in update_all_windows'
from Scene_Base:93:in `each'
from Scene_Base:93:in `update_all_windows'
from Scene_Base:49:in `update_basic'
from Scene_Battle:56:in `update_basic'
from :2576:in `update_basic'
from PBT Visual:261:in `update_basic'
from Scene_Battle:67:in `update_for_wait'
from Scene_Battle:73:in `block in wait'
from Scene_Battle:73:in `times'
from Scene_Battle:73:in `wait'
from Window_BattleLog:183:in `call'
from Window_BattleLog:183:in `wait'
from Scene_Battle:487:in `turn_start'
from Battle Control:301:in `turn_end'
from pbt mechanism:801:in `turn_end'
from Battle Control:274:in `process_action'
from Battle Control:246:in `update'
from Scene_Base:14:in `main'
from SceneManager:23:in `run'
from Main:10:in `block in <main>'





scripts used


I'm no expert scripter, but usually when I get the error "undefined method 'something' for nil:NilClass", it means that it's trying to do something to an actor/event/whatever that is not there. For example, actor ID is 0 (somewhere along the way it's assigned that), there's no such actor, so it crashes. Maybe it's trying to play the animation over something that it can't find. I don't know if this helps you, but I guess it might draw the attention of someone who knows better :LZSwink:
I'm no expert scripter, but usually when I get the error "undefined method 'something' for nil:NilClass", it means that it's trying to do something to an actor/event/whatever that is not there. For example, actor ID is 0 (somewhere along the way it's assigned that), there's no such actor, so it crashes. Maybe it's trying to play the animation over something that it can't find. I don't know if this helps you, but I guess it might draw the attention of someone who knows better :LZSwink:
THX! at least i now know what the issue might be.

Original thread: https://forums.rpgmakerweb.com/threads/undefined-method-error.171834/