Weird error during battle?

mayorswaim

Swami
Veteran
Joined
Mar 10, 2015
Messages
55
Reaction score
4
First Language
English
Primarily Uses
I think I set everything up right, if the enemy touches you it sends you into a battle with an imp, but when the character attacks I get this error: screenshot.png

(i didnt want anyone seeing the stupid placeholder name sorry : 0)

Anyway- not sure what to do, it's a script problem but I havent done anything to the script besides add another which shouldn't interfere//i didnt mess with the given script at all.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
You're clearly using a steal script: mind telling me which one?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
Could you PM me the entire text of that script, or post it in a spoiler tag?
 

mayorswaim

Swami
Veteran
Joined
Mar 10, 2015
Messages
55
Reaction score
4
First Language
English
Primarily Uses
Could you PM me the entire text of that script, or post it in a spoiler tag?
alright

                   #  Z-Systems by: Zetu  #

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

#                         *  *  *  CORE v1.01  *  *  *                         #

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

  #                              For Z01 to Z07+                             #

  # * Make sure ALL Z items are in order and adjacent to each other, with    #

  #   this script preceeding them.                                           #

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

  # General Methods :                                                        #

  # Object                                                                   #

  #   rand_range(min, max)                                                   #

  #     Give a random value between the two given values.                    #

  # Array                                                                    #

  #   random                                                                 #

  #     Returns a random item in an array.                                   #

  #   random!                                                                #

  #     Returns a random item in array and deletes it.                       #

  #   sum                                                                    #

  #     Returns sum of all values in an array.                               #

  #   mean                                                                   #

  #     Returns the average of all values in an array                        #

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

  # Handled Methods (RGSS3)                                                  #

  # Window_BattleLog                                                         #

  #   display_action_results                                                 #

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

($imported||={})[:zcore] = true

module Z

  

  def self.display_command_symbols

    symbols = []

    symbols.push:)critical)

    symbols.push:)hpdamage)

    symbols.push:)ampxdamage) if $imported[:z02]

    symbols.push:)mpdamage)   unless $imported[:z02]

    symbols.push:)tpdamage)

    symbols.push:)miss)

    symbols.push:)evasion)

    symbols.push:)steal)      if $imported[:z05]

    symbols.push:)states)

  end

  

end

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

#--------#                      #----# DO NOT EDIT PAST THIS POINT!!! #--------#

#--------# End of Customization #----# Editing will cause death by    #--------#

#--------#                      #----# brain asplosions.              #--------#

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

class Window_BattleLog < Window_Selectable

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

  # ● Overwrite method: display_action_results

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

  def display_action_results(target, item)

    if target.result.used

      last_line_number = line_number

      for symbol in Z::display_command_symbols

        case symbol

        when :critical; display_critical(target, item)

        when :damage;   display_damage(target, item)

        when :hpdamage, :mpdamage, :tpdamage, :ampxdamage

          if !target.result.missed and !target.result.evaded

            case symbol

            when :hpdamage;   display_hp_damage(target, item)

            when :mpdamage;   display_mp_damage(target, item)

            when :tpdamage;   display_tp_damage(target, item)

            when :ampxdamage; display_ampx_damage(target, item)

            end

          end

        when :states;   display_affected_status(target, item)

        when :steal;    display_steal(target, item)

        end

      end

      display_failure(target, item)

      wait if line_number > last_line_number

      back_to(last_line_number)

   target.reset_steal_item if $imported[:z05] unless target.actor?

    end

  end

  

  alias :zdf :display_failure

  def display_failure(target, item)

    return unless target.result.steal.nil?

    zdf(target, item)

  end

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

  # ● New method: display_steal    (Z05)

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

  def display_steal(target, skill)

    return unless skill.steal?

    item = target.last_stolen_item

    result = target.result.steal

    case result

    when :success

      if item.is_a?(Integer)

     add_text(sprintf(Z05::STEAL_GOLD, item, target.name))

   else

     add_text(sprintf(Z05::STEAL_ITEM, item.name, target.name))

   end

    when :nosteal

      add_text(sprintf(Z05::NO_STEALS, target.name))

    when :fail

      add_text(Z05::STEAL_FAIL)

    end

  end

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

  # ● New method: display_ampx_damage    (Z02)

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

  def display_ampx_damage(target, item)

    return if target.dead? || target.result.mp_damage == 0

    return if (resource = target.resource(item)).nil?

    Sound.play_recovery if target.result.mp_damage < 0

    add_text(target.result.ampx_damage_text(resource.name))

    wait

  end

  

end

 

module DataManager

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

  # ● Overwrite method: make_save_contents

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

  def self.make_save_contents

    contents = {}

    contents[:system]        = $game_system

    contents[:timer]         = $game_timer

    contents[:message]       = $game_message

    contents[:switches]      = $game_switches

    contents[:variables]     = $game_variables

    contents[:self_switches] = $game_self_switches

    contents[:actors]        = $game_actors

    contents[:party]         = $game_party

    contents[:troop]         = $game_troop

    contents[:map]           = $game_map

    contents[:player]        = $game_player

    #------------------------=

    contents[:quest] = QuestLog.questlist if $imported[:z07]

    #------------------------=

    contents

  end

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

  # ● Overwrite method: extract_save_contents

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

  def self.extract_save_contents(contents)

    $game_system        = contents[:system]

    $game_timer         = contents[:timer]

    $game_message       = contents[:message]

    $game_switches      = contents[:switches]

    $game_variables     = contents[:variables]

    $game_self_switches = contents[:self_switches]

    $game_actors        = contents[:actors]

    $game_party         = contents[:party]

    $game_troop         = contents[:troop]

    $game_map           = contents[:map]

    $game_player        = contents[:player]

    #-------------------=

    QuestList.loadquestlist(contents[:quest]) if $imported[:z07]

    #-------------------=

  end

  

end

 

class Object

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

  # ● New method: rand_range

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

  def rand_range(min, max)

    rand(max - min + 1) + min

  end

  

end

 

class Array

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

  # ● New method: random

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

  def random

    self[rand(size)]

  end

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

  # ● New method: random!

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

  def random!

    self.delete_at(rand(size))

  end

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

  # ● New method: sum

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

  def sum

    self.inject{|sum,x| sum + x }

  end

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

  # ● New method: mean

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

  def mean

    sum.to_f / size

  end

  

end

 

class Object

  

  def tryconvert(value)

    begin

      return eval(value)

    rescue

      return value

    end

  end

  

end
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
Can you also paste script Z05, the one that deals with stealing?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I think your problem is right there at the top of the script. First couple of lines say:

Make sure to paste all the Z scripts (Z1 - Z7) with this script on top of it.

I see nowhere where you ever added scripts Z1 - Z7 to your project. So, the error is the script is looking for something that you didn't add, and that is causing the crash.
 
Last edited by a moderator:

mayorswaim

Swami
Veteran
Joined
Mar 10, 2015
Messages
55
Reaction score
4
First Language
English
Primarily Uses
Can you also paste script Z05, the one that deals with stealing?
It's in there, but here:

 #--------------------------------------------------------------------------  # ● New method: display_steal    (Z05)

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

  def display_steal(target, skill)

    return unless skill.steal?

    item = target.last_stolen_item

    result = target.result.steal

    case result

    when :success

      if item.is_a?(Integer)

     add_text(sprintf(Z05::STEAL_GOLD, item, target.name))

   else

     add_text(sprintf(Z05::STEAL_ITEM, item.name, target.name))

   end

    when :nosteal

      add_text(sprintf(Z05::NO_STEALS, target.name))

    when :fail

      add_text(Z05::STEAL_FAIL)

    end

  end

 
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
There appears to be a script of some kind missing here: it's checking for properties on items and action results that won't exist unless a script adds them, and they're not being added here which is why you're getting an error.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top