School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,149 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,688 people online right now. Registration is fast and FREE... Join Now!




help i can't seem to fix a syntaxerror

 

help i can't seem to fix a syntaxerror, error

rue84

3 Oct, 2009 - 02:57 PM
Post #1

New D.I.C Head
*

Joined: 3 Oct, 2009
Posts: 7


My Contributions
CODE
class Game_Actor
  #-------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
   SPRITE_STATE_ID = 50           #The id of the Sprite state
   FEY_STATE_ID = 49              #The id of the Fey state
   FEY_DUST_SKILL_ID = 92         #The skill id of your fey dust skill
   ACTOR_GRAPHIC = "Actor5_dot"   #The name of the graphic file of your ascended character.
   ACTOR_GRAPHIC_ID = 2           #Which character on the sprite sheet?
   ACTOR_FACE = "Actor2"          #The name of the graphic file of your ascended character's face.
   ACTOR_FACE_ID = 0              #Which face?
   FEY_GRAPHIC = "Fey"            #The graphics file of the fey sprite.
  
class Game_Actor
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
   WHELP_STATE_ID = 33           #The id of the Whelp state
   DRAGON_STATE_ID = 32          #The id of the Dragon state
   DRAGON_BREATH_SKILL_ID = 68   #The skill id of your dragon breath skill
   ACTOR_GRAPHIC = "Actor5_dot"  #The name of the graphic file of your ascended character.
   ACTOR_GRAPHIC_ID = 2          #Which character on the sprite sheet?
   ACTOR_FACE = "Actor2"         #The name of the graphic file of your ascended character's face.
   ACTOR_FACE_ID = 0             #Which face?
   DRAGON_GRAPHIC = "Dragon"  






Ok what is wrong with it please some one tell me its bugging me cause i don't know

This post has been edited by rue84: 3 Oct, 2009 - 02:57 PM

User is offlineProfile CardPM
+Quote Post


stayscrisp

RE: Help I Can't Seem To Fix A Syntaxerror

3 Oct, 2009 - 03:01 PM
Post #2

Mouth->Insert(Foot);
Group Icon

Joined: 14 Feb, 2008
Posts: 1,404



Thanked: 54 times
Dream Kudos: 300
My Contributions
Ummmm....What language is this? Is this all you have?

What errors are you getting?

Your going to have to give more details if you expect any helpful replies icon_up.gif
User is offlineProfile CardPM
+Quote Post

rue84

RE: Help I Can't Seem To Fix A Syntaxerror

3 Oct, 2009 - 03:55 PM
Post #3

New D.I.C Head
*

Joined: 3 Oct, 2009
Posts: 7


My Contributions
no this is not all i have and it is RGSS and am just having a problem .with this part of it it keeps popping up syntaxerror on line 554 and in not sure how to fix this one i have fixed most of my problem but not this one i would post all of it but i really don't want to if i don't have to but will if need be

This post has been edited by rue84: 3 Oct, 2009 - 03:59 PM
User is offlineProfile CardPM
+Quote Post

rue84

RE: Help I Can't Seem To Fix A Syntaxerror

3 Oct, 2009 - 04:23 PM
Post #4

New D.I.C Head
*

Joined: 3 Oct, 2009
Posts: 7


My Contributions
CODE
#==============================================================================
# ** Scene_Title
#==============================================================================

class Scene_Title
  #--------------------------------------------------------------------------
  # * Command New Game
  #--------------------------------------------------------------------------
  attr_accessor :last_gem_id            # for cursor memory: Skill

  alias mod_fey_gem_cng command_new_game
  alias mod_fey_gem_cng command_new_game

  def command_new_game
    mod_fey_gem_cng
    mod_dragon_gem_cng
    $fey_gem_script = Fey_Gem_Script.new
    $dragon_gem_script = Dragon_Gem_Script.new
    $fey_gem_script.main
    $dragon_gem_script.main
  end
end

#==============================================================================
# ** Fey_Gem_Script
#==============================================================================

class Fey_Gem_Script
class Dragon_Gem_Script      
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make a fey gems object
    $fey_gems = Fey_Gems.new
    $dragon_gems = Dragon_Gems.new
    # Set up fey gems and combinations
    $fey_gems.set_up_gems
    $dragon_gems.set_up_gems
  end
end

#==============================================================================
# ** Scene_File
#==============================================================================

class Scene_File
  #--------------------------------------------------------------------------
  # * Write Save Data
  #--------------------------------------------------------------------------
  alias mod_fey_gems_wsd write_save_data
  alias mod_dragon_gems_wsd write_save_data
  alias mod_fey_gems_rsd read_save_data
  alias mod_dragon_gems_rsd read_save_data
  
  def write_save_data(file)
    mod_fey_gems_wsd(file)
    mod_dragon_gems_wsd(file)
    Marshal.dump($fey_gems, file)
    Marshal.dump($dragon_gems, file)
  end
  
  def read_save_data(file)
    mod_fey_gems_rsd(file)
    mod_dragon_gems_rsd(file)
    $fey_gems = Marshal.load(file)
    $dragon_gems = Marshal.load(file)
  end
end

#==============================================================================
# ** Gem_Combination
#------------------------------------------------------------------------------

class Gem_Combination
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor   :combination_id             # The combination's ID
  attr_accessor   :name                       # combination name
  attr_accessor   :combination_name           # combination file name
  attr_accessor   :gems                       # gems needed to mnake this combination
  attr_accessor   :state_id                   # The state bestowed by this combination
  attr_accessor   :skills_to_learn            # The skills this combination bestows.
  attr_accessor   :fey_graphic_id             # Which fey graphic?
  attr_accessor   :dragon_graphic_id  
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize (combination_id, gems, state, skills_to_learn, fey_graphic_id, dragon_graphic_id)
    @combination_id = combination_id
    @name = name
    @gems = gems
    @state_id = state
    @skills_to_learn = skills_to_learn
    @fey_graphic_id = fey_graphic_id
    @dragon_graphic_id = dragon_graphic_id
  end
  
  def get_gems
    return @gems
  end
  
  def get_name
    return @name
  end
end

#==============================================================================
# ** Fey_Gem
#------------------------------------------------------------------------------

class Fey_Gem
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor   :gem_id                     # The gem's id
  attr_accessor   :name                       # gem name
  attr_accessor   :gem_name                   # gem file name
  attr_accessor   :sp_cost                    # SP cost to splice gem.
  attr_accessor   :description                # Description of the gem.
  attr_accessor   :state_id                   # The state the gem bestows on the user.
  attr_accessor   :skills_to_learn            # The skills this gem bestows.
  attr_accessor   :fey_graphic_id             # Which fey graphic?
  attr_accessor   :dragon_graphic_id
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize (gem_id, name, sp_cost, description, state, skills_to_learn, fey_graphic_id, dragon_graphic_id)
    @gem_id = gem_id
    @name = name
    @gem_name = name
    @sp_cost = sp_cost
    @description = description
    @state_id = state
    @skills_to_learn = skills_to_learn
    @fey_graphic_id = fey_graphic_id
    @dragon_graphic_id = dragon_graphic_id
  end
end

#==============================================================================
# ** Fey_Gems
#------------------------------------------------------------------------------
#  This class handles the fey gems array. Refer to "$fey_gems" for each
#  instance of this class.
#==============================================================================

class Fey_Gems
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor   :gems                       # array of fey gems
  attr_accessor   :gem_combinations           # array of fey gem combinations
  attr_accessor   :gems_aquired               # array of fey gems gained
  
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @data = []
  end
  #--------------------------------------------------------------------------
  # * Get Gem
  #     gem_id : gem ID
  #--------------------------------------------------------------------------
  def [](gem_id)
    if @data[gem_id] == nil
      @data[gem_id] = Fey_Gem.new(gem_id)
      @data[gem_id] = Dragon_Gem.new(gem_id)
    end
    return @data[gem_id]
  end
  
  #--------------------------------------------------------------------------
  # * set_up_gems
  #--------------------------------------------------------------------------
  def set_up_gems
    @gems = []
    @gems_aquired = []
    @gem_combinations = []
    
    #Set up fey gems
    #ID, name, MP cost, description, state id (nil if basic state), skills to learn (skill ids in brackets) (nil if no skills)
    $fey_gem = Fey_Gem.new(0, "Flame", 5, "A Fire gem", 34, [77,81], 0)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(1, "Flame", 5, "A Fire gem", 17, [6,10], 0)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(2, "Eldritch", 13, "A Magical gem", nil, [88,89,54,55,92], 7)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(3, "Eldritch", 13, "A Magical gem", nil, [36,43,54,55,68], 7)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(4, "Shadow", 5, "A shadow gem", 37, [80,84], 6)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(5, "Shadow", 5, "A shadow gem", 20, [9,13], 6)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(6, "Defender", 8, "A defender gem", 38, [33,92], 7)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(7, "Defender", 8, "A defender gem", 21, [33,68], 7)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(8, "Thorn", 8, "A gem to enhance all abilities", 39, [92], 7)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(9, "Thorn", 8, "A gem to enhance all abilities", 22, [68], 7)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(10, "Frost", 5, "A frost gem", 35, [78,82], 1)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(11, "Frost", 5, "A frost gem", 18, [7,11], 1)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(12, "Thunder", 5, "A thunder gem", 36, [79,83], 4)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(13, "Thunder", 5, "A thunder gem", 19, [8,12], 4)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(14, "Miracle", 16, "A gem to emphasize growth", 40, [92], 7)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(15, "Miracle", 16, "A gem to emphasize growth", 23, [68], 7)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(16, "Force", 8, "A warrior gem", 41, [92], 7)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(17, "Force", 8, "A warrior gem", 24, [68], 7)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(18, "Trance", 8, "When spliced.... ????", nil, [92], 7)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(19, "Trance", 8, "When spliced.... ????", nil, [68], 7)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(20, "Radiance", 5, "A holy gem", nil, [63,92], 2)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(21, "Radiance", 5, "A holy gem", nil, [63,68], 2)
    @gems.push($dragon_gem)
    $fey_gem = Fey_Gem.new(22, "Infinity", 40, "The ultimate gem", 42, [92], 3)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(23, "Infinity", 40, "The ultimate gem", 25, [68], 3)
    @gems.push($dragon_gem)
    # - NOTE -
    # To test the Mutant gem, add members to your party to see what combinations
    # you get
    # - END NOTE -
    $fey_gem = Fey_Gem.new(24, "Fusion", 8, "Fuses the power of your allies", nil, nil, 7)
    @gems.push($fey_gem)
    $dragon_gem = Dragon_Gem.new(25, "Fusion", 8, "Fuses the power of your allies", nil, nil, 7)
    @gems.push($dragon_gem)
    
    #Set up fey gems
    #ID, gem ids needed to splice, state id (nil if basic state), skills to learn (skill ids in brackets - nil if no new skills)
    $gem_combination = Gem_Combination.new(0, [0,2], 43, [16,85,18,77,81], 0)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(1, [10,2], 44, [22,86,19,78,82], 1)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(2, [12,2], 45, [24,25,87,79,83], 4)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(3, [4,2], 46, [21,89,35,80,84], 6)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(4, [16,2], 49, [61,62,63,66,67,92], 7)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(5, [0,10,12], 47, [18,19,87,92], 7)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(7, [14,18,22], 48, nil, 3)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(8, [1,3], 26, [16,17,18,6,10], 0)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(9, [11,3], 27, [22,23,19,7,11], 1)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(10, [13,3], 28, [24,25,26,8,12], 4)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(11, [5,3], 29, [21,43,35,9,13], 6)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(12, [17,3], 32, [61,62,63,66,67,68], 7)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(13, [1,11,13], 30, [18,19,26,68], 7)
    @gem_combinations.push($gem_combination)
    $gem_combination = Gem_Combination.new(14, [15,19,23], 31, nil, 3)
    @gem_combinations.push($gem_combination)

  end
  
  #--------------------------------------------------------------------------
  # * gain_gem
  #--------------------------------------------------------------------------
  def gain_gem(gem_id)
    @gems_aquired.push(@gems[gem_id])
  end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
  $BECOME_ID = 73                 #The skill id of your become skill
  $ACCESSION_ID = 5
  $REVERSE_ID = 14                #The skill id of your reverse skill
  FEY_TRANSFORM_ANIMATION = 79    #The id of the animation for transformations.
  DRAGON_TRANSFORM_ANIMATION = 79
  
  #--------------------------------------------------------------------------
  # * alias listings
  #--------------------------------------------------------------------------
  alias mod_determine_skill determine_skill
  alias mod_update update
  
  #--------------------------------------------------------------------------
  # * determine_skill
  #--------------------------------------------------------------------------
  def determine_skill
    if @skill.id == $BECOME_ID
      start_gem_selection
    if @skill.id == $ACCESSION_ID
      start_gem_selection
    elsif @skill.id == $REVERSE_ID
      @active_battler.revert_form
      end_skill_selection
      next_actor
    else
      mod_determine_skill
    end
  end

  #--------------------------------------------------------------------------
  # * start_gem_selection
  #--------------------------------------------------------------------------
  def start_gem_selection
    end_skill_selection
    @help_window = Window_Help.new
    @gem_window = Window_Gem_Select.new(0, 54, 300, 364, @active_battler)
    @gem_window.help_window = @help_window
    @selected_gems = Window_Selected_Gems.new()
    @actor_command_window.active = false
  end

  #--------------------------------------------------------------------------
  # * end_gem_selection
  #--------------------------------------------------------------------------
  def end_gem_selection
    if @gem_window != nil
      @gem_window.dispose
      @gem_window = nil
      @help_window.dispose
      @help_window = nil
      @selected_gems.dispose
      @selected_gems = nil
    end
    @actor_command_window.active = true
  end

  #--------------------------------------------------------------------------
  # * update_gem_selection
  #--------------------------------------------------------------------------
  def update_gem_selection
    @gem_window.active = true
    @gem_window.update
    @help_window.update
    @selected_gems.update
    if Input.trigger?(Input::B)
      @active_battler.mp += @selected_gems.get_mp_cost
      Sound.play_cancel
      @status_window.refresh
      end_gem_selection
    elsif Input.trigger?(Input::C)
      @gem = @gem_window.gem
      if @gem != nil
        @active_battler.last_gem_id = @gem.id
      end
      if @active_battler.gem_can_use?(@gem) and @gem_window.gem_selected?(@gem)
        Sound.play_decision
        determine_gem(@gem)
      else
        Sound.play_buzzer
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # * determine_gem
  #--------------------------------------------------------------------------
  def determine_gem(gem)
    if gem == "Wipe"
      @active_battler.mp += @selected_gems.get_mp_cost
      @selected_gems.clear_selected_gems
      @gem_window.clear_selected_gems
    elsif gem == "Select"
      @chosen_gems = @selected_gems.get_selected_gems
      if @chosen_gems.size != 0
        Sound.play_decision
        @active_battler.calculate_mp_damage(@selected_gems.get_mp_cost)
        @active_battler.transform_into_fey(@selected_gems.get_selected_gems)
        end_gem_selection
        display_animation([@active_battler], FEY_TRANSFORM_ANIMATION)
        next_actor
      if @chosen_gems.size != 0
        Sound.play_decision
        @active_battler.calculate_mp_damage(@selected_gems.get_mp_cost)
        @active_battler.transform_into_dragon(@selected_gems.get_selected_gems)
        end_gem_selection
        display_animation([@active_battler], DRAGON_TRANSFORM_ANIMATION)
        next_actor
      else
        Sound.play_buzzer
      end
    else
      @active_battler.mp -= gem.sp_cost
      @selected_gems.add_gem(gem)
      @gem_window.add_gem(gem)
    end
    if gem != "Select"
      @status_window.refresh
      @gem_window.refresh
      @selected_gems.refresh
    end
  end
  
  #--------------------------------------------------------------------------
  # * update
  #--------------------------------------------------------------------------
  def update
    super
    update_basic(true)
    update_info_viewport                  # Update information viewport
    if $game_message.visible
      @info_viewport.visible = false
      @message_window.visible = true
    end
    unless $game_message.visible          # Unless displaying a message
      return if judge_win_loss            # Determine win/loss results
      update_scene_change
      if @target_enemy_window != nil
        update_target_enemy_selection     # Select target enemy
      elsif @target_actor_window != nil
        update_target_actor_selection     # Select target actor
      elsif @skill_window != nil
        update_skill_selection            # Select skill
      elsif @gem_window != nil
        update_gem_selection              # Select gem
      elsif @item_window != nil
        update_item_selection             # Select item
      elsif @party_command_window.active
        update_party_command_selection    # Select party command
      elsif @actor_command_window.active
        update_actor_command_selection    # Select actor command
      else
        process_battle_event              # Battle event processing
        process_action                    # Battle action
        process_battle_event              # Battle event processing
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # * turn_end
  #--------------------------------------------------------------------------
  def turn_end
    $game_troop.turn_ending = true
    $game_party.slip_damage_effect
    $game_party.slip_fey_damage_effect(self)
    $game_troop.slip_damage_effect
    $game_party.do_auto_recovery
    $game_troop.preemptive = false
    $game_troop.surprise = false
    process_battle_event
    $game_troop.turn_ending = false
    start_party_command_selection
  def turn_end
    $game_troop.turn_ending = true
    $game_party.slip_damage_effect
    $game_party.slip_dragon_damage_effect(self)
    $game_troop.slip_damage_effect
    $game_party.do_auto_recovery
    $game_troop.preemptive = false
    $game_troop.surprise = false
    process_battle_event
    $game_troop.turn_ending = false
    start_party_command_selection
  end
  
  #--------------------------------------------------------------------------
  # * battle_end
  #--------------------------------------------------------------------------
  def battle_end(result)
    if result == 2 and not $game_troop.can_lose
      call_gameover
    else
      $game_party.clear_actions
      $game_party.remove_states_battle
      $game_party.check_feys
      $game_troop.clear
      if $game_temp.battle_proc != nil
        $game_temp.battle_proc.call(result)
        $game_temp.battle_proc = nil
      end
  def battle_end(result)
    if result == 2 and not $game_troop.can_lose
      call_gameover
    else
      $game_party.clear_actions
      $game_party.remove_states_battle
      $game_party.check_dragons
      $game_troop.clear
      if $game_temp.battle_proc != nil
        $game_temp.battle_proc.call(result)
        $game_temp.battle_proc = nil
      end
      unless $BTEST
        $game_temp.map_bgm.play
        $game_temp.map_bgs.play
      end
      $scene = Scene_Map.new
      @message_window.clear
      Graphics.fadeout(30)
    end
    $game_temp.in_battle = false
  end
  
end

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================

class Game_Actor
  #-------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
   SPRITE_STATE_ID = 50           #The id of the Sprite state
   FEY_STATE_ID = 49              #The id of the Fey state
   FEY_DUST_SKILL_ID = 92         #The skill id of your fey dust skill
   ACTOR_GRAPHIC = "Actor5_dot"   #The name of the graphic file of your ascended character.
   ACTOR_GRAPHIC_ID = 2           #Which character on the sprite sheet?
   ACTOR_FACE = "Actor2"          #The name of the graphic file of your ascended character's face.
   ACTOR_FACE_ID = 0              #Which face?
   FEY_GRAPHIC = "Fey"            #The graphics file of the fey sprite.
  
class Game_Actor
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
   WHELP_STATE_ID = 33           #The id of the Whelp state
   DRAGON_STATE_ID = 32          #The id of the Dragon state
   DRAGON_BREATH_SKILL_ID = 68   #The skill id of your dragon breath skill
   ACTOR_GRAPHIC = "Actor5_dot"  #The name of the graphic file of your ascended character.
   ACTOR_GRAPHIC_ID = 2          #Which character on the sprite sheet?
   ACTOR_FACE = "Actor2"         #The name of the graphic file of your ascended character's face.
   ACTOR_FACE_ID = 0             #Which face?
   DRAGON_GRAPHIC = "Dragon"    
  
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :last_gem_id             # for cursor memory: Gem
  attr_accessor :fey_mp_damage           # mp_damage done by gem transformation
  attr_accessor :old_graphic_file
  attr_accessor :old_graphic_index
  attr_accessor :old_face_file
  attr_accessor :old_face_index
  #--------------------------------------------------------------------------
  # * Alias listings
  #--------------------------------------------------------------------------
  alias mod_initialize initialize
  
  #--------------------------------------------------------------------------
  # * Initialize
  #--------------------------------------------------------------------------
  def initialize(actor_id)
    mod_initialize(actor_id)
    @last_gem_id = 0
    @skills_to_remember = []
    @skills_to_forget = []
    @fey_mp_damage = 0
    @old_graphic_file = actor.character_name
    @old_graphic_index = actor.character_index
    @old_face_file = actor.face_name
    @old_face_index = actor.face_index
  def initialize(actor_id)
    tywin_initialize(actor_id)
    @last_gem_id = 0
    @skills_to_remember = []
    @skills_to_forget = []
    @dragon_mp_damage = 0
    @old_graphic_file = actor.character_name
    @old_graphic_index = actor.character_index
    @old_face_file = actor.face_name
    @old_face_index = actor.face_index
  end
  
  #--------------------------------------------------------------------------
  # * transform_into_fey
  #--------------------------------------------------------------------------
  def transform_into_fey(gems)
    @skills_to_remember = self.skills
    self.forget_all_skills
    if gems.size == 1
      self.transform_into_one_gem_fey(gems[0])
    else
      self.transform_into_multi_gem_fey(gems)
    end
    self.learn_skill($REVERSE_ID)
    self.forget_skill($BECOME_ID)
    @skills_to_forget = []
    for skill in self.skills
      @skills_to_forget.push(skill.id)
    end
  end
  def transform_into_dragon(gems)
    @skills_to_remember = self.skills
    self.forget_all_skills
    if gems.size == 1
      self.transform_into_one_gem_dragon(gems[0])
    else
      self.transform_into_multi_gem_dragon(gems)
    end
    self.learn_skill($REVERSE_ID)
    self.forget_skill($ACCESSION_ID)
    @skills_to_forget = []
    for skill in self.skills
      @skills_to_forget.push(skill.id)
    end
  end
  
  #--------------------------------------------------------------------------
  # * transform_into_one_gem_fey
  #--------------------------------------------------------------------------
  def transform_into_one_gem_fey(gem)
    self.set_graphic(FEY_GRAPHIC, gem.fey_graphic_id, ACTOR_FACE, ACTOR_FACE_ID)
    if gem.state_id == nil
      self.add_state(SPRITE_STATE_ID)
    else
      self.add_state(gem.state_id)
    end
    self.learn_fey_skills_one_gem(gem)
  end
  def transform_into_one_gem_dragon(gem)
    self.set_graphic(DRAGON_GRAPHIC, gem.dragon_graphic_id, ACTOR_FACE, ACTOR_FACE_ID)
    if gem.state_id == nil
      self.add_state(WHELP_STATE_ID)
    else
      self.add_state(gem.state_id)
    end
    self.learn_dragon_skills_one_gem(gem)
  end
  
  #--------------------------------------------------------------------------
  # * transform_into_multi_gem_fey
  #--------------------------------------------------------------------------
  def transform_into_multi_gem_fey(gems)
    combinations = $fey_gems.gem_combinations
    combination_id = combination_test(gems, combinations)
    if combination_id == nil
      self.set_graphic(FEY_GRAPHIC,7, ACTOR_FACE, ACTOR_FACE_ID)
      self.add_state(FEY_STATE_ID)
    else
      self.set_graphic(FEY_GRAPHIC, combinations[combination_id].fey_graphic_id, ACTOR_FACE, ACTOR_FACE_ID)
      self.add_state(combinations[combination_id].state_id)
    end
    if combination_id != nil
      self.learn_fey_skills_multi_gem(combinations[combination_id], gems)
    else
      self.learn_fey_skills_multi_gem(nil, gems)
    end
  end
  def transform_into_multi_gem_dragon(gems)
    combinations = $dragon_gems.gem_combinations
    combination_id = combination_test(gems, combinations)
    if combination_id == nil
      self.set_graphic(DRAGON_GRAPHIC,7, ACTOR_FACE, ACTOR_FACE_ID)
      self.add_state(DRAGON_STATE_ID)
    else
      self.set_graphic(DRAGON_GRAPHIC, combinations[combination_id].dragon_graphic_id, ACTOR_FACE, ACTOR_FACE_ID)
      self.add_state(combinations[combination_id].state_id)
    end
    if combination_id != nil
      self.learn_dragon_skills_multi_gem(combinations[combination_id], gems)
    else
      self.learn_dragon_skills_multi_gem(nil, gems)
    end
  end
  
  #--------------------------------------------------------------------------
  # * combination_test
  #--------------------------------------------------------------------------
  def combination_test(gems, combinations)
    for combination in combinations
      gems_needed = combination.gems
      if gems_needed.size == gems.size
        return combination.combination_id if all_gems_in_combination?(gems, gems_needed)
      end
    end
    return nil
  end
  
  #--------------------------------------------------------------------------
  # * all_gems_in_combination?
  #--------------------------------------------------------------------------
  def all_gems_in_combination?(gems, gems_needed)
    is_a_combination = []
    for gem in gems
      if gems_needed.include?(gem.gem_id)
        is_a_combination.push(true)
      else
        is_a_combination.push(false)
      end
    end
    return false if is_a_combination.include?(false)
    return true
  end
  #--------------------------------------------------------------------------
  # * gem_can_use?
  #--------------------------------------------------------------------------
  def gem_can_use?(gem)
      return true if gem == "Wipe"
      return true if gem == "Select"
      return false unless $fey_gems.gems_aquired.include?(gem)
      return false if gem.sp_cost > mp
      return true
    end
    def gem_can_use?(gem)
      return true if gem == "Clear"
      return true if gem == "Confirm"
      return false unless $dragon_gems.gems_aquired.include?(gem)
      return false if gem.sp_cost > mp
      return true
  end
    
  #--------------------------------------------------------------------------
  # * forget_all_skills
  #--------------------------------------------------------------------------
  def forget_all_skills
    @actor_skills = self.skills
    for skill in @actor_skills
      if skill.id != $BECOME_ID
        self.forget_skill(skill.id)
      end
    end
  end
  def forget_all_skills
    @actor_skills = self.skills
    for skill in @actor_skills
      if skill.id != $ACCESSION_ID
        self.forget_skill(skill.id)
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # * learn_fey_skills_one_gem
  #--------------------------------------------------------------------------
  def learn_fey_skills_one_gem(gem)
    if gem.name == "Fusion"
      self.learn_skills_fusion($game_party.members)
    else
      for skill_id in gem.skills_to_learn
        self.learn_skill(skill_id)
      end
    end
  end
  def learn_dragon_skills_one_gem(gem)
    if gem.name == "Fusion"
      self.learn_skills_fusion($game_party.members)
    else
      for skill_id in gem.skills_to_learn
        self.learn_skill(skill_id)
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # * learn_fey_skills_mutli_gem
  #--------------------------------------------------------------------------
  def learn_fey_skills_multi_gem(combination, gems)
    if combination == nil
      learn_skills_multi_gem_no_combination(gems)
    else
      for skill_id in combination.skills_to_learn
        self.learn_skill(skill_id)
      end
    end
  end
  def learn_dragon_skills_multi_gem(combination, gems)
    if combination == nil
      learn_skills_multi_gem_no_combination(gems)
    else
      for skill_id in combination.skills_to_learn
        self.learn_skill(skill_id)
      end
    end
  end
    
  #--------------------------------------------------------------------------
  # * learn_fey_skills_mutli_gem_no_combination
  #--------------------------------------------------------------------------
  def learn_skills_multi_gem_no_combination(gems)
    for gem in gems
      learn_fey_skills_one_gem(gem)
    end
    self.learn_skill(FEY_DUST_SKILL_ID)
  end
  def learn_skills_multi_gem_no_combination(gems)
    for gem in gems
      learn_dragon_skills_one_gem(gem)
    end
    self.learn_skill(DRAGON_BREATH_SKILL_ID)
  end
  
  #--------------------------------------------------------------------------
  # * learn_skills_fusion
  #--------------------------------------------------------------------------
  def learn_skills_fusion(members)
    @actor_ids = []
    for member in members
      @actor_ids.push(member.id)
    end
    if @actor_ids.include?(2)
      self.learn_skill(45)
      self.learn_skill(46)
      self.learn_skill(47)
      self.learn_skill(48)
    end
    if @actor_ids.include?(3)
      self.learn_skill(41)
      self.learn_skill(42)
    end
    if @actor_ids.include?(4)
      self.learn_skill(64)
      self.learn_skill(65)
    end
    if @actor_ids.include?(5)
      self.learn_skill(89)
      self.learn_skill(44)
    end
    if @actor_ids.include?(6)
      self.learn_skill(24)
      self.learn_skill(25)
    end
    if @actor_ids.include?(7)
      self.learn_skill(35)
      self.learn_skill(36)
      self.learn_skill(25)
    end
  end
  
  #--------------------------------------------------------------------------
  # * revert_form
  #--------------------------------------------------------------------------
  def revert_form
    self.set_graphic(self.old_graphic_file, self.old_graphic_index, self.old_face_file, self.old_face_index)
    self.remove_fey_states
    self.relearn_skills
  end
  def revert_form
    self.set_graphic(self.old_graphic_file, self.old_graphic_index, self.old_face_file, self.old_face_index)
    self.remove_dragon_states
    self.relearn_skills
  end
  
  #--------------------------------------------------------------------------
  # * remove_fey_stats
  #--------------------------------------------------------------------------
  def remove_fey_states
    for gem in $fey_gems.gems
      if gem.state_id != nil
        self.remove_state(gem.state_id)
      end
    end
    for combination in $fey_gems.gem_combinations
      if combination.state_id != nil
        self.remove_state(combination.state_id)
      end
    end
  end
  def remove_dragon_states
    for gem in $dragon_gems.gems
      if gem.state_id != nil
        self.remove_state(gem.state_id)
      end
    end
    for combination in $dragon_gems.gem_combinations
      if combination.state_id != nil
        self.remove_state(combination.state_id)
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # * relearn_skills
  #--------------------------------------------------------------------------
  def relearn_skills
    for id in @skills_to_forget
      self.forget_skill(id)
    end
    for skill in @skills_to_remember
      self.learn_skill(skill.id)
    end
  end
    
end

#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass of the Game_Actor
# and Game_Enemy classes.
#==============================================================================
class Game_Battler
  
  #--------------------------------------------------------------------------
  # * fey_damage
  #--------------------------------------------------------------------------
  def fey_damage(damage)
    self.mp -= damage
  end
  def dragon_damage(damage)
    self.mp -= damage
  end
  
  #--------------------------------------------------------------------------
  # * slip_fey_damage?
  #--------------------------------------------------------------------------
  def slip_fey_damage?
    for gem in $fey_gems.gems
      if gem.state_id != nil
        return true if states.include?($data_states[gem.state_id])
      end
    end
    for combination in $fey_gems.gem_combinations
      if combination.state_id != nil
        return true if states.include?($data_states[combination.state_id])
      end
    end
    return false
  end
  def slip_dragon_damage?
    for gem in $dragon_gems.gems
      if gem.state_id != nil
        return true if states.include?($data_states[gem.state_id])
      end
    end
    for combination in $dragon_gems.gem_combinations
      if combination.state_id != nil
        return true if states.include?($data_states[combination.state_id])
      end
    end
    return false
  end
  
  #--------------------------------------------------------------------------
  # * calculate_mp_damage
  #--------------------------------------------------------------------------
  def calculate_mp_damage(total_gem_cost)
    self.fey_mp_damage = total_gem_cost / 3 + 2
  end
  def calculate_mp_damage(total_gem_cost)
    self.dragon_mp_damage = total_gem_cost / 3 + 1
  end


This post has been edited by rue84: 3 Oct, 2009 - 04:34 PM
User is offlineProfile CardPM
+Quote Post

rue84

RE: Help I Can't Seem To Fix A Syntaxerror

3 Oct, 2009 - 04:37 PM
Post #5

New D.I.C Head
*

Joined: 3 Oct, 2009
Posts: 7


My Contributions
CODE
#--------------------------------------------------------------------------
  # * slip_fey_damage_effect
  #--------------------------------------------------------------------------
  def slip_fey_damage_effect(battle_scene)
    if slip_fey_damage?
      if self.fey_mp_damage < self.mp
        battle_scene.wait(10)
        message_window = Window_BattleMessage.new
        message_window.add_instant_text(self.name + " takes " + self.fey_mp_damage.to_s + " MP damage!")
        battle_scene.wait(60)
        message_window.dispose
        self.mp -= self.fey_mp_damage
      else
        self.revert_form
      end
    end
  end
  def slip_dragon_damage_effect(battle_scene)
    if slip_dragon_damage?
      if self.dragon_mp_damage < self.mp
        battle_scene.wait(10)
        message_window = Window_BattleMessage.new
        message_window.add_instant_text(self.name + " takes " + self.dragon_mp_damage.to_s + " MP damage!")
        battle_scene.wait(60)
        message_window.dispose
        self.mp -= self.dragon_mp_damage
      else
        self.revert_form
      end
    end
  end

end

#==============================================================================
# ** Game_Unit
#------------------------------------------------------------------------------
#  This class handles units. It's used as a superclass of the Game_Party and
# Game_Troop classes.
#==============================================================================
class Game_Unit
  #--------------------------------------------------------------------------
  # * slip_fey_damage_effect
  #--------------------------------------------------------------------------
  def slip_fey_damage_effect(battle_scene)
    for member in members
      member.slip_fey_damage_effect(battle_scene)
    end
  end
  #--------------------------------------------------------------------------
  # * slip_dragon_damage_effect
  #--------------------------------------------------------------------------
  def slip_dragon_damage_effect(battle_scene)
    for member in members
      member.slip_dragon_damage_effect(battle_scene)
    end
  end
  
  #--------------------------------------------------------------------------
  # * check_feys
  #--------------------------------------------------------------------------
  def check_feys
    for member in members
      if member.slip_fey_damage?
        member.revert_form
      end
    end
  end
  #--------------------------------------------------------------------------
  # * check_dragons
  #--------------------------------------------------------------------------
  def check_dragons
    for member in members
      if member.slip_dragon_damage?
        member.revert_form
      end
    end
  end
  
end




ok i had to split it but here it all is
User is offlineProfile CardPM
+Quote Post

stayscrisp

RE: Help I Can't Seem To Fix A Syntaxerror

4 Oct, 2009 - 03:10 AM
Post #6

Mouth->Insert(Foot);
Group Icon

Joined: 14 Feb, 2008
Posts: 1,404



Thanked: 54 times
Dream Kudos: 300
My Contributions
Can you post line 554 please as I don't really want to trawl through it all trying to find it, it shouldn't be too hard to see the problem.
User is offlineProfile CardPM
+Quote Post

rue84

RE: Help I Can't Seem To Fix A Syntaxerror

4 Oct, 2009 - 11:08 PM
Post #7

New D.I.C Head
*

Joined: 3 Oct, 2009
Posts: 7


My Contributions
CODE
class Game_Actor


lol if you need more its the 1st post
User is offlineProfile CardPM
+Quote Post

Aeternalis

RE: Help I Can't Seem To Fix A Syntaxerror

5 Oct, 2009 - 10:19 AM
Post #8

D.I.C Regular
***

Joined: 13 Jul, 2009
Posts: 273



Thanked: 25 times
My Contributions
I really don't know anything at all about the language your using.. but it looks like your declaring the class Game_Actor twice..

have you tried removing the second declaration (i think it's a declaration.. don't really know)

CODE


class Game_Actor
  #-------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
   SPRITE_STATE_ID = 50           #The id of the Sprite state
   FEY_STATE_ID = 49              #The id of the Fey state
   FEY_DUST_SKILL_ID = 92         #The skill id of your fey dust skill
   ACTOR_GRAPHIC = "Actor5_dot"   #The name of the graphic file of your ascended character.
   ACTOR_GRAPHIC_ID = 2           #Which character on the sprite sheet?
   ACTOR_FACE = "Actor2"          #The name of the graphic file of your ascended character's face.
   ACTOR_FACE_ID = 0              #Which face?
   FEY_GRAPHIC = "Fey"            #The graphics file of the fey sprite.
  
#  -- REOMOVE THIS>> class Game_Actor
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
   WHELP_STATE_ID = 33           #The id of the Whelp state
   DRAGON_STATE_ID = 32          #The id of the Dragon state
   DRAGON_BREATH_SKILL_ID = 68   #The skill id of your dragon breath skill
   ACTOR_GRAPHIC = "Actor5_dot"  #The name of the graphic file of your ascended character.
   ACTOR_GRAPHIC_ID = 2          #Which character on the sprite sheet?
   ACTOR_FACE = "Actor2"         #The name of the graphic file of your ascended character's face.
   ACTOR_FACE_ID = 0             #Which face?
   DRAGON_GRAPHIC = "Dragon"  


just a thought.. none of the other classes are declared twice like that.. was that a cut and paste error?

good luck!
Aet
User is offlineProfile CardPM
+Quote Post

stayscrisp

RE: Help I Can't Seem To Fix A Syntaxerror

5 Oct, 2009 - 11:38 AM
Post #9

Mouth->Insert(Foot);
Group Icon

Joined: 14 Feb, 2008
Posts: 1,404



Thanked: 54 times
Dream Kudos: 300
My Contributions
Aeternalis is right, it is declared twice, which may be the source of your problem.

This RGSS is not very easy to read or decipher, it doesn't seem to follow Ruby syntax as much as I thought, in Ruby you have to use CamelCase when declaring class' so I have read, you could try that.
User is offlineProfile CardPM
+Quote Post

rue84

RE: Help I Can't Seem To Fix A Syntaxerror

5 Oct, 2009 - 08:44 PM
Post #10

New D.I.C Head
*

Joined: 3 Oct, 2009
Posts: 7


My Contributions
ill try that and thanks

well i tried and it still didn't work but thanks any way
User is offlineProfile CardPM
+Quote Post

rue84

RE: Help I Can't Seem To Fix A Syntaxerror

9 Oct, 2009 - 11:52 AM
Post #11

New D.I.C Head
*

Joined: 3 Oct, 2009
Posts: 7


My Contributions
again if y'all have any other ideas on how to fix it please share it with me
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 04:28PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month