RPG Maker Forums

Hi there im new around here, this is my first post! I was running through the official tutorials and installed Jet's Skill Self Effects script. Although i havent even tried to implement any features of the script, when i test my project it crashes with an error every time i attack

Error: Script 'skill self effects' line 37: NoMethodError occurred

           Undefined method '[]' for nil:NilClass

Here is the text copied from the script:

#===============================================================================

# Skill Self Effects

# By Jet10985 (Jet)

# Requested by Touchfuzzy

#===============================================================================

# This script will allow you to specify a skill's effects tot arget the user

# instead of the target, on skills that don't already effect the user.

# This script has: 0 customization options.

#===============================================================================

# Overwritten Methods:

# None

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

# Aliased methods:

# Game_Battler: item_effect_apply

#===============================================================================

=begin

To specify the effects, use this notetag in the skill's notebox:

 

<self effect: 1>

or

<self effect: 1, 2, 3> to specify more than 1 effect

--------------------------------------------------------------------------------

Use of this script could be as the following.

 

You make a "Berserk Strike" skill, which does 200% damage to an enemy.

You make the 2nd effect "Defense Down 50%" and want it applied to the user.

You'd use this notetag: <self effect: 2>

=end

 

class RPG::Skill

  

  def self_effects

    if @self_effects.nil?

      @self_effects = []

      self.note.each_line {|a|

        scan = a.scan(/<self[ ]*effect[ ]*\:[ ]*(\d+(?:[ ]*,[ ]*\d+)*)>/i)

        scan[0][0].scan(/\d+/).each {|b|                                                         #//////////*************/////////// this is line 37 :D /////////////************////////#

          @self_effects.push(@effects[b.to_i - 1]) if b.to_i >= 1

        }

      }

    end

    @self_effects

  end

end

 

class Game_Battler

  

  alias jet3745_item_effect_apply item_effect_apply

  def item_effect_apply(user, item, effect, reffed = false)

    if item.is_a?(RPG::Skill) && item.self_effects.include?(effect) && !reffed

      user.item_effect_apply(user, item, effect, true)

      return

    end

    jet3745_item_effect_apply(user, item, effect)

  end

end

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,447
Members
137,820
Latest member
georg09byron
Top