Just need help fixing this script line

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
139
Reaction score
13
First Language
english
Primarily Uses
N/A
When the forums changed it messed up old scripts posted, tried sorting this one myself but I haven't seen this particular script setup before.

I get the error for the line " class[-_ ]?holder[-_ ]?battler[-_ ]?{class_id}:\s*(.*)\s*>"
Not sure how to unsort that one, any help would be appreciated.

The Error Message.

The unsorted/broken script

#===============================================================================#
# script: Customizable Holder Battlers
# Author: Selchar
# Credits: Yami
#================================================================================
#begin
# This is an extention of Yami's Holder Battler addon for Battle Engine Symphony.
# It allows for different battlers based on class id, as well as changing it
# via scriptcall.
# Scriptcall changes take priority over class specific, which takes priority over
# the default holder notetag.
#-------------------------------------------------------------------------------#
#Actor Notetag
# <class holder battler class_id: filename>
#-------------------------------------------------------------------------------#
# Scriptcall
#-------------------------------------------------------------------------------
# $game_actors[actor_id].new_holders_name = 'filename'

# Replace class_id or actor_id with the relevant number, and filename with the
# name of the holder style image you want to use.
# =end
#===============================================================================#
# The script
#===============================================================================
module
Selchar module Symphony
def self.holder_class(class_id)
class[-_ ]?holder[-_ ]?battler[-_ ]?{class_id}:\s*(.*)\s*>
end
end
end
class Game_Actor < Game_Battler
attr_accessor:new_holders_name def holders_name
if
@new_holders_name != nil
return @new_holders_name
if @new_holders_name != ''
end
return
actor.class_holder_name(@class_id)
if actor.class_holder_name(@class_id)
return actor.holders_name
end
end
class RPG::Actor
def class_holder_name(class_id)
if @class_holder_name.nil?
@class_holder_name = {} $data_classes.each
do |i| next
unless i @class_holder_name[i.id] = $1
if @note =~ Selchar::Symphony.holder_class(i.id)
end
end
@class_holder_name[class_id]
end
end
#===============================================================================#
 
Last edited:

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
1,980
Reaction score
971
First Language
Spanish
Primarily Uses
RMVXA
Code:
#===============================================================================
# Script: Customizable Holder Battlers
# Author: Selchar
# Requestor: Nosleinad
# Credits: Yami
#================================================================================
=begin
This is an extention of Yami's Holder Battler addon for Battle Engine Symphony.
It allows for different battlers based on class id, as well as changing it viascriptcall.
Scriptcall changes take priority over class specific, which takespriority over the default holder notetag.
#-------------------------------------------------------------------------------
# Actor Notetag
#-------------------------------------------------------------------------------
<class holder battler class_id: filename>
#-------------------------------------------------------------------------------
# Scriptcall
#-------------------------------------------------------------------------------
$game_actors[actor_id].new_holders_name = 'filename'
Replace class_id or actor_id with the relevant number, and filename with thename of the holder style image you want to use.
=end
#===============================================================================
# The script
#===============================================================================
module Selchar
module Symphony
  def self.holder_class(class_id)
   /<class[-_ ]?holder[-_ ]?battler[-_ ]?#{class_id}:\s*(.*)\s*>/i
  end
end
end

class Game_Actor < Game_Battler
    attr_accessor :new_holders_name
    def holders_name
        if @new_holders_name != nil
            return @new_holders_name if @new_holders_name != ''
        end
        return actor.class_holder_name(@class_id) if actor.class_holder_name(@class_id)
        return actor.holders_name
    end
end

class RPG::Actor
def class_holder_name(class_id)
    if @class_holder_name.nil?
        @class_holder_name = {}
        $data_classes.each do |i|
            next unless i
            if @note =~ Selchar::Symphony.holder_class(i.id)
             @class_holder_name[i.id] = $1
            end
        end
    end
    @class_holder_name[class_id]
end
end
#===============================================================================
# End of File
#===============================================================================
that's a regexp structure, it should be correct.
make sure you have the requirements for it to run.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
1,946
Reaction score
417
First Language
English
Primarily Uses
RMVXA
Try this
Ruby:
#===============================================================================
# Script: Customizable Holder Battlers
# Author: Selchar
# Requestor: Nosleinad
# Credits: Yami
#===============================================================================
=begin
    This is an extention of Yami's Holder Battler addon for Battle Engine Symphony.
    It allows for different battlers based on class id, as well as changing it via
    scriptcall. Scriptcall changes take priority over class specific, which takes
    priority over the default holder notetag.
#-------------------------------------------------------------------------------
# Actor Notetag
#-------------------------------------------------------------------------------
    <class holder battler class_id: filename>
#-------------------------------------------------------------------------------
# Scriptcall
#-------------------------------------------------------------------------------
    $game_actors[actor_id].new_holders_name = 'filename'
    Replace class_id or actor_id with the relevant number, and filename with the
    name of the holder style image you want to use.
=end
#===============================================================================
# The script
#===============================================================================
module Selchar
    module Symphony
        def self.holder_class(class_id)
            /<class[-_ ]?holder[-_ ]?battler[-_ ]?#{class_id}:\s*(.*)\s*>/i
        end
    end
end
class Game_Actor < Game_Battler
    attr_accessor :new_holders_name
    def holders_name
        if @new_holders_name != nil
            return @new_holders_name if @new_holders_name != ''
        end
        return actor.class_holder_name(@class_id) if actor.class_holder_name(@class_id)
        return actor.holders_name
    end
end
class RPG::Actor
    def class_holder_name(class_id)
        if @class_holder_name.nil?
            @class_holder_name = {}
            $data_classes.each do |i|
                next unless i
                @class_holder_name[i.id] = $1 if @note =~ Selchar::Symphony.holder_class(i.id)
            end
        end
        @class_holder_name[class_id]
    end
end
#===============================================================================
# End of File
#===============================================================================
*ninja'd
it should be correct.
He was missing part of the code. (I think)
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,301
Reaction score
7,878
First Language
English
Primarily Uses
RMMV

I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
139
Reaction score
13
First Language
english
Primarily Uses
N/A
Code:
#===============================================================================
# Script: Customizable Holder Battlers
# Author: Selchar
# Requestor: Nosleinad
# Credits: Yami
#================================================================================
=begin
This is an extention of Yami's Holder Battler addon for Battle Engine Symphony.
It allows for different battlers based on class id, as well as changing it viascriptcall.
Scriptcall changes take priority over class specific, which takespriority over the default holder notetag.
#-------------------------------------------------------------------------------
# Actor Notetag
#-------------------------------------------------------------------------------
<class holder battler class_id: filename>
#-------------------------------------------------------------------------------
# Scriptcall
#-------------------------------------------------------------------------------
$game_actors[actor_id].new_holders_name = 'filename'
Replace class_id or actor_id with the relevant number, and filename with thename of the holder style image you want to use.
=end
#===============================================================================
# The script
#===============================================================================
module Selchar
module Symphony
  def self.holder_class(class_id)
   /<class[-_ ]?holder[-_ ]?battler[-_ ]?#{class_id}:\s*(.*)\s*>/i
  end
end
end

class Game_Actor < Game_Battler
    attr_accessor :new_holders_name
    def holders_name
        if @new_holders_name != nil
            return @new_holders_name if @new_holders_name != ''
        end
        return actor.class_holder_name(@class_id) if actor.class_holder_name(@class_id)
        return actor.holders_name
    end
end

class RPG::Actor
def class_holder_name(class_id)
    if @class_holder_name.nil?
        @class_holder_name = {}
        $data_classes.each do |i|
            next unless i
            if @note =~ Selchar::Symphony.holder_class(i.id)
             @class_holder_name[i.id] = $1
            end
        end
    end
    @class_holder_name[class_id]
end
end
#===============================================================================
# End of File
#===============================================================================
that's a regexp structure, it should be correct.
make sure you have the requirements for it to run.
I can actually battle now, but when I use the script command $game_actors[1].new_holders_name = 'blahblah' via common event during battle I get this error instead.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
1,980
Reaction score
971
First Language
Spanish
Primarily Uses
RMVXA
that means either the common event is badly structured, or the interpreter.
start by putting the scripts in one by one, and try isolating the problem.
this script is correct, as it is.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
4,845
Reaction score
5,524
First Language
Indonesian
Primarily Uses
RMVXA
I can actually battle now, but when I use the script command $game_actors[1].new_holders_name = 'blahblah' via common event during battle I get this error instead.
Can we take a look at how you write the script call? And by that I mean you take a screenshot to your actual script call. Not write it here.
 

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
139
Reaction score
13
First Language
english
Primarily Uses
N/A
Can we take a look at how you write the script call? And by that I mean you take a screenshot to your actual script call. Not write it here.
Okay but don't laugh. The way I have the common event called is that when the skill is used, it adds the state first and then calls the common event second.
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
4,845
Reaction score
5,524
First Language
Indonesian
Primarily Uses
RMVXA
Did you just add > symbol at the end of the script call?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I found a rat in my grain barrel this morning. I've seen lots of mice in there, but this is the first time I've seen a full-blown rat.
Hope y'all are staying healthy, safe and informed. Maybe pick up a new hobby or skill while you're at it.
Wanted to post a video of location i've finished but it doesn't work...
The game jam has done a lot of good in actually kicking my butt into action. I've even gotten over my crippling hatred of mapping thanks to it! :LZSexcite:

(Okay, there's also schoolwork forcing me to get on the computer, but I like to give credit where credit is due.)
Decided to start working on my second biome/area...


I'm sure I'll end up hating and changing things a whole lot over the next week. :LZSexcite:

Forum statistics

Threads
95,656
Messages
930,811
Members
125,991
Latest member
harleyquinn
Top