Sujet n°6001
Posté par Ashikata le 15 Fév - 00:33 (2010)
Titre : Bug pokemon menu
Vous connaissez surement le menu pokédex de lén et bien j'essayais de changer quelque chose dans le script pokémon_menu le problème c'est que je l'ai trop modifié et j'ai dut reprendre le script d'origine mais maintenant j'ai une erreur de syntaxe qui s'affiche (et il n'y a pas de log).
Je vous passe le script qui me dit donc qu'il y a une erreur de syntaxe ligne 24. Merci de m'aider.
Code:
#==============================================================================
# ■ Pokemon_Menu
# Pokemon Script Project - Krosk 
# 18/07/07
#-----------------------------------------------------------------------------
# Scene pour Menu Pokédex V4 par Lén
#-----------------------------------------------------------------------------
module POKEMON_S
  class Pokemon_Menu
    #--------------------------------------------------------------------------
    #
    #--------------------------------------------------------------------------
    def initialize(index_flow = 1)
      $index_flow = index_flow
    end
    #--------------------------------------------------------------------------
    # 
    #--------------------------------------------------------------------------
    def main
      $index_max = 5
      #$index_flow = 1
      $fontsize = 14      
      @spriteset = Spriteset_Map.new
      $heureold = $game_variables[42]
      $minutesold = $game_variables[43]
      @pokedex = Sprite.new
      @pokedex.bitmap = RPG::Cache.picture("DexV4")
      @pokedex.x = 640
      Graphics.transition
      if @pokedex.x != 0
        loop do
          @pokedex.x -= 80
          Graphics.update
          if @pokedex.x == 0
            break
          end
        end
      end
      @flow = Window_Flow.new
      loop do
        Graphics.update
        Input.update
        update
        if $scene != self
          break
        end
      end
      @flow.dispose
#-------------------------------------------------------------------------------      
      loop do
        @pokedex.x -= 80
        Graphics.update
        if @pokedex.x == -640
          break
        end
      end
#-------------------------------------------------------------------------------
      @spriteset.dispose
      @pokedex.dispose
    end


    def update
      @spriteset.update
      update_command
    end
  
    def update_command
      
      if Input.repeat?(Input::RIGHT)
        $test_direction = "droite"
        $testx_old = $testx
        if $index_flow == $index_max
          $index_flow = 1
          $testx = 80
          $test_direction = "gauche"
          $flow_speed = 40
        else
          $testx -= 180
          $index_flow += 1
          $flow_speed = 20
        end
        @flow.refresh        
      end
      
      if Input.repeat?(Input::LEFT)
        $test_direction = "gauche"
        $testx_old = $testx
        if $index_flow == 1
          $index_flow = $index_max
          $testx = -180*($index_max-1)+80
          $test_direction = "droite"
          $flow_speed = 40
        else
          $testx += 180
          $index_flow -= 1
          $flow_speed = 20
        end
        @flow.refresh
      end
      
      if Input.trigger?(Input::B)
        $game_system.se_play($data_system.cancel_se)
        $scene = Scene_Map.new
        return
      end
      if Input.trigger?(Input::C)
        $back = true
        if $game_party.actors.size == 0 and @command_window.index < 4
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        case $index_flow
        when 1 # Pokédex
          if not($data_pokedex[0])
            $game_system.se_play($data_system.buzzer_se)
            return
          end
          $game_system.se_play($data_system.decision_se)
          $scene = Pokemon_Pokedex.new
        when 2 # Menu
          if $pokemon_party.size == 0
            $game_system.se_play($data_system.buzzer_se)
            return
          end
          $scene = Pokemon_Party_Menu.new
        when 3 # Sac
          $game_system.se_play($data_system.decision_se)
          $scene = Pokemon_Item_Bag.new
        when 4 # Carte dresseur
          $game_system.se_play($data_system.decision_se)
          $game_temp.common_event_id = 19
          $scene = Scene_Map.new
        when 5 # Sauvegarde
          if $game_system.save_disabled
            $game_system.se_play($data_system.buzzer_se)
            return
          end
          $game_system.se_play($data_system.decision_se)
          $scene = Pokemon_Save.new      
        end
        return
      end
    end
  end
end





Posté par Ashikata le 26 Fév - 01:13 (2010)
Up: Le lien vers le menu ./2670.html


Re-up