Problem with Victor's target arrow script

Discussion in 'RGSSx Script Support' started by S.Court, Feb 14, 2018.

Thread Status:
Not open for further replies.
  1. S.Court

    S.Court Veteran Veteran

    Messages:
    394
    Likes Received:
    97
    Location:
    Colombia
    First Language:
    Español
    Primarily Uses:
    RMVXA
    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.

    [​IMG]

    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? && !@action.for_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
     
    #1
  2. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    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.
     
    #2
    S.Court likes this.
  3. S.Court

    S.Court Veteran Veteran

    Messages:
    394
    Likes Received:
    97
    Location:
    Colombia
    First Language:
    Español
    Primarily Uses:
    RMVXA
    Excellent! It works, it doesn't show anything when the skill is used, but at least I can use it. Thanks a lot :)
     
    #3
  4. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,598
    Likes Received:
    10,511
    First Language:
    English
    Primarily Uses:
    RMVXA

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #4
Thread Status:
Not open for further replies.

Share This Page