Problem with Victor's target arrow script

Hello, I'm using Victor Target Arrow's script and I'm having a trouble when I use a skill target the user itself. The next error is presented.

28053859_1973894099306200_578586587_n.png


And this is the part of the script is showing the problem (the second line is the 451 line the error is refering to)

Code:
  def draw_tartge_info(align)
    if @action.for_one?
      @help_window.set_target_text(target(0), align)
    elsif @action.for_all? && @action.for_random?
      text = help_info[:random_enemies] if @action.for_opponent?
      text = help_info[:random_actors]  if @action.for_friend?
      text = help_info[:random_target]  if @action.for_all_targets?
      @help_window.set_info_text(text, align)
    elsif @action.for_all? && [email protected]_random?
      text = help_info[:all_enemies] if @action.for_opponent?
      text = help_info[:all_actors]  if @action.for_friend?
      text = help_info[:all_target]  if @action.for_all_targets?
      @help_window.set_info_text(text, align)
    end
  end
end

Does someone know a way to fix this problem? Thank you
You can try to enter this line right above the error line:
Code:
return @help_window.set_info_text("",0) if @action.nil?
I have no idea what the align argument should be, but usually it's either 0, 1 or 2, so it should work.
This should clear the help window when there is no action inputted (or when the game thinks there is no action inputted) instead of crashing.
You can try to enter this line right above the error line:
Code:
return @help_window.set_info_text("",0) if @action.nil?
I have no idea what the align argument should be, but usually it's either 0, 1 or 2, so it should work.
This should clear the help window when there is no action inputted (or when the game thinks there is no action inputted) instead of crashing.

Excellent! It works, it doesn't show anything when the skill is used, but at least I can use it. Thanks a lot 🙂
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-victors-target-arrow-script.91317/