Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

undefined method 'scope' for nil:NilClass

When I choose any battle command, I receive the following error about 75% of the time:

Code:
Script 'Game_BattleAction' line 62: NoMethodError occurred.

undefined method 'scope' for nil:NilClass.

I'm using the official English version 1.02a, along with the followng scripts:

Code:
The RMXP SDK 1.5
Near Fantastica's View_Range Script
fukuyama/Syvkal's LevelUpWindow

If possible, please help!

Edit: I can probably upload the project file if necessary.
 
Of course! Line 62 is in bold.

Code:
#--------------------------------------------------------------------------
  # * Determine if for One Ally (HP 0)
  #--------------------------------------------------------------------------
  def for_one_friend_hp0?
    # If kind = skill, and effect scope is for ally (only 0 HP)
    [B]if @kind == 1 and [5].include?($data_skills[@skill_id].scope)[/B]
      return true
    end
    # If kind = item, and effect scope is for ally (only 0 HP)
    if @kind == 2 and [5].include?($data_items[@item_id].scope)
      return true
    end
    return false
  end
 
I know how hard it is to define 'scope' ^_^ Well, cut the sick jokes ...

You probably don't have any party members in party, at least that's what it looks like to me ... the other possibility would be that you don't have any skills, but that's impossible, as far as I know ^_^
 
Another edit: I deleted the Equipment Skills and Keyboard Input Module scripts and I'm still receiving the error...

Yet another edit: I deleted ALL non-standard scripts, including the SDK, and I'm still getting the error.

:(
 
It occurs after I attack, use a skill, defend, anything except escape I guess. I haven't tried items yet, but I assume it's the same.

EDIT: Yeah, it's the same for items.
 
New project works fine, I didn't want to have to resort to it but I did, haha. I'm really not sure what caused the problem still, I just hope it doesn't happen again. I also added the View_Range script again with no problem. I'll be playtesting much more frequently this time to prevent reoccurrences. Thanks for reading, everyone.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top