Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: Heretic86 on March 31, 2021, 05:15:38 pm

Title: XP - Constructor for RPG::BattleEventPage
Post by: Heretic86 on March 31, 2021, 05:15:38 pm
So playing around with some stuff, and I came across this:

module RPG
  class Troop
    def initialize
      @id = 0
      @name = ""
      @members = []
      @pages = [RPG::BattleEventPage.new]
    end
    attr_accessor :id
    attr_accessor :name
    attr_accessor :members
    attr_accessor :pages
  end
end

Trouble is that there is nothing in the documentation for the structure of the RPG::BattleEventPage.new

Whats up with that?
Title: Re: XP - Constructor for RPG::BattleEventPage
Post by: KK20 on April 01, 2021, 12:40:00 am
It's another one of the help file's mistakes. You can easily confirm this by trying
p RPG::BattleEventPage
and get
uninitialized constant RPG::BattleEventPage

If you then try to do
p RPG::Troop.new
You'll see
@pages=[#<RPG::Troop::Page ... >]

The text in the RPG::Troop documentation in the help file is correct.
Quotepages
  Battle events. An RPG::Troop::Page array.

Though I never really realized this until just now and saw that XPA has this incorrect class definition in its scripts.
Title: Re: XP - Constructor for RPG::BattleEventPage
Post by: Heretic86 on April 01, 2021, 12:57:33 am
Thank you!