Problem with Yanfly Battle Engine

Could someone explain to me what this part does? (starts from line 833)

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

  # alias method: setup_new_animation

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

  unless $imported["YEA-CoreEngine"]

  alias sprite_battler_setup_new_animation_abe setup_new_animation

  def setup_new_animation

    sprite_battler_setup_new_animation_abe

    return if @battler.pseudo_ani_id <= 0

    animation = $data_animations[@battler.pseudo_ani_id]

    mirror = @battler.animation_mirror

    start_pseudo_animation(animation, mirror)

    @battler.pseudo_ani_id = 0

  end

  end # $imported["YEA-CoreEngine"]
 

Cause i'm getting this error when I enter combat

 

Script Yanfly Battle Engine Test line 840: NoMethodError occured. undefined method'<=' for nil:NilClass
1) Did you save the game before testing?


2) Are you testing it using a new game or a loaded game?


3) Are you using any other script that are modifying the battle, especially battlers and animations?


4) Without seeing the whole script, it would be quite hard to determine what a method really does. Or I'd say how the script uses it.
1) Did you save the game before testing?

2) Are you testing it using a new game or a loaded game?

3) Are you using any other script that are modifying the battle, especially battlers and animations?

4) Without seeing the whole script, it would be quite hard to determine what a method really does. Or I'd say how the script uses it.
Thanks for the help but I solved the problem somehow.

Had to start a completly new game, the save files from from the previous build corrupted it.
Most of Yanfly's scripts doesn't work on save files that are made before the scripts are added...


And it's always safer to test on a new game for every new script
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
Thanks for the help but I solved the problem somehow.

Had to start a completly new game, the save files from from the previous build corrupted it.
That's normal for scripts. If a script defines a new variable that needs to be saved with the player, then all old saves no longer work as that variable does not exist in the old saves.

As a general rule, always start a new game after adding a script. Otherwise, it is going to crash 99.9999% of the time due to missing variables that have to be defined at game start for the script to work.
Depending on how the script is set-up... Newer scripts have already circumvented that by simply checking if the variable exists already, if not it loads the default value set for that variable. At least, that's how we do our scripts now.
Depending on how the script is set-up... Newer scripts have already circumvented that by simply checking if the variable exists already, if not it loads the default value set for that variable. At least, that's how we do our scripts now.
Yeah, Hime showed me a way to do that. However, many scripts still don't do that, so still best to just start a new game.
Can anyone help me with this? the animation repeats twice :/ 

View My Video

and heres what i have on the Note tag:
 

<cast ani: 126>

</cast ani>

<target action>

icon create: user, weapon1, hand, 539

icon: user, weapon1, angle, 45

icon: user, weapon1, cur_x 12

wait: 3

icon delete: user, weapon1

icon create: user, weapon2, hand, 540

icon: user, weapon2, angle, 45

icon: user, weapon2, cur_x 12

wait:3

icon delete: user, weapon2

icon create: user, weapon3, hand, 541

icon: user, weapon3, angle, 45

icon: user, weapon3, cur_x 12

wait: 3

icon create: user, arrow, hand, 542

icon: user, arrow, rotate, 90, 24

icon throw user: target, arrow, 16, 24, wait

icon delete: user, arrow

attack animation: target, wait

skill effect: whole

icon delete: user, weapon3

</target action>


and heres the part that can be customize on the code:

3445g28.jpg


Does anyone knows why i keep getting the 2 animations instead of only 1?

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-yanfly-battle-engine.36285/