Sujet n°10561
Posté par Girakoth le 26 Oct - 21:42 (2011)
Titre : Bug script "Mappemonde"
Bonjour à tous!
Je viens d'installer le script "Mappemonde" de Brendan dans mon projet sur PSP DS 0.4 (précisons-le).
J'ai donc mis ma map et les deux autres images dans le dossier "Pictures", mais j'ai un bug en lançant le jeu.
Etant donné que j'ai modifié le script "Pokemon_Menu" (espérant que ce soit lui qui corresponde au menu ouvrable via la touche X) afin d'avoir accès à la map par ce menu, il est fort probable que l'erreur vienne de là.

Voici le contenu de log.txt:
Spoiler
---------- Erreur de script : Window_Message* ----------
----- Version du logiciel : PSP DS v0.4
----- Type
NoMethodError
----- Message
- ARGS - [5]
undefined method `[]' for nil:NilClass
----- Position dans Window_Message*
Ligne 24
----- Backtrace
Script : Window_Message* | Ligne : 24 | Méthode : in `initialize_old'
Script : Window_Message_Arrow* | Ligne : 27 | Méthode : in `initialize'
Script : Scene_Battle 1 | Ligne : 41 | Méthode : in `new'
Script : Scene_Battle 1 | Ligne : 41 | Méthode : in `main'
Script : Main | Ligne : 58


Le contenu du script "Pokemon_Menu"
Spoiler
#==============================================================================
# ■ Pokemon_Menu
# Pokemon Script Project - Krosk
# 18/07/07
# 22/02/10 - Palbolsky
#-----------------------------------------------------------------------------
# Scène modifiable
#-----------------------------------------------------------------------------
# Menu principal accessible par échap
#-----------------------------------------------------------------------------
module POKEMON_S
  class Pokemon_Menu < Window_Base
    #--------------------------------------------------------------------------
    #
    #--------------------------------------------------------------------------
    def initialize(menu_index = 0)
      @menu_index = menu_index
      super(0,0,640,480)
      self.contents = Bitmap.new(width - 32, height - 32)    
      self.opacity = 0    
      self.z = 11     
    end     
    #--------------------------------------------------------------------------
    #
    #--------------------------------------------------------------------------
    def main
      @spriteset = Spriteset_Map.new
      @interface = Interface_Echap.new
     
      if POKEMON_S::VIEWER_TEAM
        @pkmn_team = Pokemon_Equipe.new
      end       
     
      s1 = "POKéDEX"
      s3 = "POKéMON"
      s5 = "SAC"
      s7 = "WORLD MAP"
      s2 = Player.name
      s4 = "SAUVER"
      s6 = "OPTIONS"
      s8 = "QUITTER"
     
      @command_window = Window_Command.new(80, , $fontsizebig, 2, 14)     
      @command_window.index = @menu_index
      @command_window.x = 480 - 169 - 123 + 200
      @command_window.y = 28 - 20
      @command_window.z = 10000
      @command_window.visible = false
     
      @selecteur = Sprite.new
      @selecteur.z = 200
      if $color_menu == 1 or $color_menu == nil # Vert
        @string = "_rouge"     
      elsif $color_menu == 0 # Bleu
        @string = "_vert"
      elsif $color_menu == 2 # Rouge
        @string = "_bleu"
      end
      @selecteur.bitmap = RPG::Cache.picture("Menu Echap/selector_menu" + @string)                      
  
      if @command_window.index == 0
        @selecteur.x = 37
        @selecteur.y = 249    
      elsif @command_window.index == 2
        @selecteur.x = 37
        @selecteur.y = 289
      elsif @command_window.index == 4
        @selecteur.x = 37
        @selecteur.y = 329
      elsif @command_window.index == 6
        @selecteur.x = 37
        @selecteur.y = 369
      end
     
      if @command_window.index == 1
        @selecteur.x = 117
        @selecteur.y = 249
      elsif @command_window.index == 3
        @selecteur.x = 117
        @selecteur.y = 289
      elsif @command_window.index == 5
        @selecteur.x = 117
        @selecteur.y = 329 
      elsif @command_window.index == 7
        @selecteur.x = 117
        @selecteur.y = 369
      end     
     
      if $pokemon_party.size == 0
        # Enlève accès Equipe
        @command_window.disable_item(2)
      end
      if not($data_pokedex[0])
        # Enlève accès Pokédex si non possédé
        @command_window.disable_item(0)
      end
      if $game_system.save_disabled
        @command_window.disable_item(5)
      end         
     
      @command_window.disable_item(5)     
         
      Graphics.transition
      loop do            
        Graphics.update
        Input.update
        update
        if $scene != self
          break
        end
      end   
      Graphics.freeze      
      @command_window.dispose
      @spriteset.dispose
      @selecteur.dispose      
      @interface.dispose             
      @pkmn_team.dispose if not @pkmn_team.nil?
      Graphics.freeze
    end   
    #--------------------------------------------------------------------------
    #
    #--------------------------------------------------------------------------
    def update
      if @command_window.index == 0
        @selecteur.x = 37
        @selecteur.y = 249    
      elsif @command_window.index == 2
        @selecteur.x = 37
        @selecteur.y = 289
      elsif @command_window.index == 4
        @selecteur.x = 37
        @selecteur.y = 329
      elsif @command_window.index == 6
        @selecteur.x = 37
        @selecteur.y = 369
      elsif @command_window.index == 1
        @selecteur.x = 117
        @selecteur.y = 249
      elsif @command_window.index == 3
        @selecteur.x = 117
        @selecteur.y = 289
      elsif @command_window.index == 5
        @selecteur.x = 117
        @selecteur.y = 329 
      elsif @command_window.index == 7
        @selecteur.x = 117
        @selecteur.y = 369
      end           
     
      # ウィンドウを更新    
      @command_window.update
      @spriteset.update
      @selecteur.update
      @interface.update     
      # コマンドウィンドウがアクティブの場合: update_command を呼ぶ
      if @command_window.active
        update_command
        return
      end
    end
   
    def dispose
      super
    end
     
    #--------------------------------------------------------------------------
    # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
    #--------------------------------------------------------------------------
    def update_command           
      # B ボタンが押された場合
      if Input.trigger?(Input::B)
        # キャンセル SE を演奏
        $game_system.se_play($data_system.cancel_se)
        # マップ画面に切り替え      
        $scene = Scene_Map.new
        self.contents.clear
        return      
      end
      # C ボタンが押された場合
      if Input.trigger?(Input::C)        
        # パーティ人数が 0 人で、セーブ、ゲーム終了以外のコマンドの場合
        if $game_party.actors.size == 0 and @command_window.index < 4
          # ブザー SE を演奏
          $game_system.se_play($data_system.buzzer_se)
          return         
        end
        # コマンドウィンドウのカーソル位置で分岐
        case @command_window.index        
        when 0 # 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
          self.contents.clear
        when 2 # Menu
          if $pokemon_party.size == 0
            $game_system.se_play($data_system.buzzer_se)
            return
          end
          $game_system.se_play($data_system.decision_se)
          $scene = Pokemon_Party_Menu.new
        when 4 # Sac
          $game_system.se_play($data_system.decision_se)
          $scene = Pokemon_Item_Bag.new
        when 6 # Pokématos
          if $game_switches[9] == false
            $game_system.se_play($data_system.buzzer_se)
            return
          end
          $game_system.se_play($data_system.decision_se)
          $scene = Pokematos.new     
        when 1 # Carte dresseur
          $game_system.se_play($data_system.decision_se)
          $game_temp.common_event_id = 19
          $scene = Scene_Map.new          
        when 3 # 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
          self.contents.clear
        when 5 # OPTIONS
          $game_system.se_play($data_system.decision_se)
          $scene = OPTIONS.new    
        when 7 # WORLD MAP
          $game_system.se_play($data_system.decision_se)
          $scene = Scene_Carte.new
        end
        return
      end
    end
  end
end


Le contenu du script de Brendan:
Spoiler

#==============================================================================
# ■ Scene_Carte
# par Brendan 75
# 29/12/09
#-----------------------------------------------------------------------------
# Mappemonde adaptable à n'importe qu'elle région.
#==============================================================================
class Scene_Carte
&nbsp;
&nbsp; #--------------------------------------------------------------------------
&nbsp; # ● Initialize
&nbsp; #--------------------------------------------------------------------------
&nbsp; def initialize
&nbsp; &nbsp;
&nbsp; &nbsp; # Numéro de la variable des coordonnée du hero en X et en Y
&nbsp; &nbsp; $var_x = 60
&nbsp; &nbsp; $var_y = 61
&nbsp; &nbsp;
&nbsp; &nbsp; # Nom de l'image de fond (avec l'extension et entre guillement)
&nbsp; &nbsp; @carte_img = "Koden.png"
&nbsp; &nbsp;
&nbsp; &nbsp; # Nom de l'image du curseur (avec l'extension et entre guillement)
&nbsp; &nbsp; @curseur_img = "map_curseur.png"
&nbsp; &nbsp;
&nbsp; &nbsp; # Nom de l'image réprésentant le personnage (avec l'extension et entre guillement)
&nbsp; &nbsp; @perso_img = "map_hero.png"
&nbsp; &nbsp;
&nbsp; &nbsp; # La map est-elle visible en fond ? (true si oui, false si non)
&nbsp; &nbsp; @spriteset_visible = true
&nbsp; &nbsp;
&nbsp; &nbsp; # Coordonnées X et Y de la carte
&nbsp; &nbsp; @map_x = 0
&nbsp; &nbsp; @map_y = 0
&nbsp; &nbsp;
&nbsp; &nbsp; # Taille des cases (mettre 32 pour 32x32)
&nbsp; &nbsp; @cote_case = 8
&nbsp; &nbsp;
&nbsp; &nbsp; # Nombre de case à la verticale et à l'horizontale
&nbsp; &nbsp; @nb_case_v = 18
&nbsp; &nbsp; @nb_case_h = 24
&nbsp; &nbsp;
&nbsp; &nbsp; # Coordonnées X et Y des noms
&nbsp; &nbsp; @text_x = 0
&nbsp; &nbsp; @text_y = 0
&nbsp; &nbsp;
&nbsp; &nbsp; # Couleur du texte pour les noms (Color.new(Rouge, Vert, Bleu), par défaut blanc)
&nbsp; &nbsp; @text_color = Color.new(255, 255, 255)
&nbsp; &nbsp;
&nbsp; &nbsp; # Taille du texte pour les noms ($fontsize pour la taille par défaut)
&nbsp; &nbsp; @text_size = $fontsize
&nbsp; &nbsp;
&nbsp; &nbsp; # Police du texte pour les noms ($fontface pour la police par défaut, nom entre guillemet)
&nbsp; &nbsp; @text_police = $fontface
&nbsp; &nbsp;
&nbsp; &nbsp; # Idem pour les descriptions.
&nbsp; &nbsp; @desc_x = 0
&nbsp; &nbsp; @desc_y = 0
&nbsp; &nbsp; @desc_color = Color.new(255, 255, 255)
&nbsp; &nbsp; @desc_size = $fontsize
&nbsp; &nbsp; @desc_police = $fontface
&nbsp; &nbsp;
&nbsp; &nbsp; #--------------------------------------------------------------------------
&nbsp; &nbsp; # Les zones
&nbsp; &nbsp; #
&nbsp; &nbsp; #&nbsp; &nbsp;-> Nom (entre guillemets)
&nbsp; &nbsp; #&nbsp; &nbsp;-> Description
&nbsp; &nbsp; #&nbsp; &nbsp;-> Découvert
&nbsp; &nbsp; #&nbsp; &nbsp;-> type (0:"normal" 1:"ville")
&nbsp; &nbsp; #
&nbsp; &nbsp; #--------------------------------------------------------------------------
&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; if $local == nil
&nbsp; &nbsp; &nbsp; $local =&nbsp; []
&nbsp; &nbsp; &nbsp; for x in 0.. @nb_case_h-1
&nbsp; &nbsp; &nbsp; &nbsp; $local[x] = []
&nbsp; &nbsp; &nbsp; &nbsp; for y in 0.. @nb_case_v-1
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $local[x][y] = ["","", false, 0]
&nbsp; &nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; end
&nbsp; &nbsp;
&nbsp; &nbsp; # - init(x, y, nom, desc, type) pour initialisé une zone. -
&nbsp; &nbsp; init(0, 0, "Exemple 1", "Rien qu'un exemple.", 0)
&nbsp; &nbsp; init(3, 2..4, "Exemple 2", "Rien qu'un exemple...", 0)&nbsp; &nbsp;
&nbsp; &nbsp; # ---------------------------------------------------------
&nbsp; &nbsp;
&nbsp; &nbsp; note
&nbsp; end
&nbsp;
&nbsp;
&nbsp; #--------------------------------------------------------------------------
&nbsp; # ● Main
&nbsp; #--------------------------------------------------------------------------
&nbsp; def main
&nbsp; &nbsp;
&nbsp; &nbsp; @spriteset = Spriteset_Map.new if @spriteset_visible
&nbsp; &nbsp;
&nbsp; &nbsp; @background = Sprite.new
&nbsp; &nbsp; @map.bitmap = RPG::Cache.picture(@carte_img)
&nbsp; &nbsp; @background.x = 0
&nbsp; &nbsp; @background.y = 0
&nbsp; &nbsp; @background.z = 5
&nbsp; &nbsp;
&nbsp; &nbsp; @curseur = Sprite.new
&nbsp; &nbsp; @curseur.bitmap = RPG::Cache.picture(@curseur_img)
&nbsp; &nbsp; @curseur.x = @map_x + @cote_case * ($game_variables[$var_x]-1)
&nbsp; &nbsp; @curseur.y = @map_y + @cote_case * ($game_variables[$var_y]-1)
&nbsp; &nbsp; @curseur.z = 8
&nbsp; &nbsp; @index = [$game_variables[$var_x],$game_variables[$var_y]]
&nbsp; &nbsp;
&nbsp; &nbsp; @hero = Sprite.new
&nbsp; &nbsp; @hero.bitmap = RPG::Cache.picture(@perso_img)
&nbsp; &nbsp; @hero.x = @map_x + @cote_case * ($game_variables[$var_x]-1)
&nbsp; &nbsp; @hero.y = @map_y + @cote_case * ($game_variables[$var_y]-1)
&nbsp; &nbsp; @hero.z = 7
&nbsp; &nbsp;
&nbsp; &nbsp; @text = Window_Base.new(0 - 16, 0 - 16, 672, 512)
&nbsp; &nbsp; @text.opacity = 0
&nbsp; &nbsp; @text.contents = Bitmap.new(672, 512)
&nbsp; &nbsp; @text.z = 6
&nbsp; &nbsp;
&nbsp; &nbsp; refresh
&nbsp; &nbsp;
&nbsp; &nbsp; Graphics.transition
&nbsp; &nbsp; loop do
&nbsp; &nbsp; &nbsp; Graphics.update
&nbsp; &nbsp; &nbsp; Input.update
&nbsp; &nbsp; &nbsp; update
&nbsp; &nbsp; &nbsp; if $scene != self
&nbsp; &nbsp; &nbsp; &nbsp; break
&nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; end
&nbsp; &nbsp; Graphics.freeze
&nbsp; &nbsp; @spriteset.dispose if @spriteset_visible
&nbsp; &nbsp; @background.dispose
&nbsp; &nbsp; @curseur.dispose
&nbsp; &nbsp; @hero.dispose
&nbsp; &nbsp; @text.dispose
&nbsp; end
&nbsp;
&nbsp; #--------------------------------------------------------------------------
&nbsp; # ● Update
&nbsp; #--------------------------------------------------------------------------
&nbsp; def update
&nbsp; &nbsp;
&nbsp; &nbsp; @curseur.x = @map_x + @cote_case * (@index[0]-1)
&nbsp; &nbsp; @curseur.y = @map_y + @cote_case * (@index[1]-1)
&nbsp; &nbsp;
&nbsp; &nbsp; if Input.trigger?(Input::B)
&nbsp; &nbsp; &nbsp; $game_system.se_play($data_system.cancel_se)
&nbsp; &nbsp; &nbsp; $scene = Scene_Map.new
&nbsp; &nbsp; &nbsp; return
&nbsp; &nbsp; end
&nbsp; &nbsp;
&nbsp; &nbsp; if Input.trigger?(Input::DOWN)
&nbsp; &nbsp; &nbsp; if @index[1] != @nb_case_v
&nbsp; &nbsp; &nbsp; &nbsp; $game_system.se_play($data_system.cursor_se)
&nbsp; &nbsp; &nbsp; &nbsp; @index[1] += 1
&nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp; refresh
&nbsp; &nbsp; &nbsp; return
&nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; if Input.trigger?(Input::UP)
&nbsp; &nbsp; &nbsp; if @index[1] != 1
&nbsp; &nbsp; &nbsp; &nbsp; $game_system.se_play($data_system.cursor_se)
&nbsp; &nbsp; &nbsp; &nbsp; @index[1] -= 1
&nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp; refresh
&nbsp; &nbsp; &nbsp; return
&nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; if Input.trigger?(Input::LEFT)
&nbsp; &nbsp; &nbsp; if @index[0] != 1
&nbsp; &nbsp; &nbsp; &nbsp; $game_system.se_play($data_system.cursor_se)
&nbsp; &nbsp; &nbsp; &nbsp; @index[0] -= 1
&nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp; refresh
&nbsp; &nbsp; &nbsp; return
&nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; if Input.trigger?(Input::RIGHT)
&nbsp; &nbsp; &nbsp; if @index[0] != @nb_case_h
&nbsp; &nbsp; &nbsp; &nbsp; $game_system.se_play($data_system.cursor_se)
&nbsp; &nbsp; &nbsp; &nbsp; @index[0] += 1
&nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp; refresh
&nbsp; &nbsp; &nbsp; return
&nbsp; &nbsp; end
&nbsp; end
&nbsp;
&nbsp; #--------------------------------------------------------------------------
&nbsp; # ● Refresh
&nbsp; #--------------------------------------------------------------------------
&nbsp; def refresh
&nbsp; &nbsp; @text.contents.clear
&nbsp; &nbsp; string = $local[@index[0]][@index[1]][0]
&nbsp; &nbsp; desc&nbsp; =&nbsp; $local[@index[0]][@index[1]][1]
&nbsp; &nbsp; @text.contents.font.name = @text_police
&nbsp; &nbsp; @text.contents.font.size = @text_size
&nbsp; &nbsp; @text.draw_text(@text_x, @text_y, 247, 16, string, 1, @text_color, 0)
&nbsp; &nbsp; @text.contents.font.name = @desc_police
&nbsp; &nbsp; @text.contents.font.size = @desc_size
&nbsp; &nbsp; @text.draw_text(@desc_x, @desc_y, 247, 16, desc, 1, @desc_color, 0)
&nbsp; end
&nbsp;
&nbsp; #--------------------------------------------------------------------------
&nbsp; # ● Init(x, y, nom, desc, type)
&nbsp; #--------------------------------------------------------------------------
&nbsp; def init(o_x, o_y, nom, desc, o_type)
&nbsp; &nbsp;
&nbsp; &nbsp; if o_type.is_a? String
&nbsp; &nbsp; &nbsp; case o_type
&nbsp; &nbsp; &nbsp; when "ville"
&nbsp; &nbsp; &nbsp; &nbsp; type = 1
&nbsp; &nbsp; &nbsp; else
&nbsp; &nbsp; &nbsp; &nbsp; type = 0
&nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; else
&nbsp; &nbsp; &nbsp; type = o_type
&nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; if o_x.is_a? Range
&nbsp; &nbsp; &nbsp; o_x.each {|x|
&nbsp; &nbsp; &nbsp; &nbsp; if o_y.is_a? Range
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; o_y.each {|y| $local[x][y] = [nom,desc, false, type] }
&nbsp; &nbsp; &nbsp; &nbsp; else
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $local[x][o_y] = [nom,desc, false, type]
&nbsp; &nbsp; &nbsp; &nbsp; end&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; else
&nbsp; &nbsp; &nbsp; if o_y.is_a? Range
&nbsp; &nbsp; &nbsp; &nbsp; o_y.each {|y| $local[o_x][y] = [nom,desc, false, type] }
&nbsp; &nbsp; &nbsp; else
&nbsp; &nbsp; &nbsp; &nbsp; $local[o_x][o_y] = [nom,desc, false, type]
&nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; end&nbsp; &nbsp;
&nbsp; end
&nbsp;
&nbsp; #--------------------------------------------------------------------------
&nbsp; # ● note
&nbsp; #--------------------------------------------------------------------------
&nbsp; def note
&nbsp; &nbsp; logfile = File.open("Data/carte.txt", "w")
&nbsp; &nbsp; logfile.write("# ---------- Mappemonde ----------\n")
&nbsp; &nbsp; logfile.write("\n")
&nbsp; &nbsp; empty = 0
&nbsp; &nbsp;
&nbsp; &nbsp; for x in 0..$local.size-1
&nbsp; &nbsp; &nbsp; for y in 0..$local[x].size-1
&nbsp; &nbsp; &nbsp; &nbsp; nom = $local[x][y][0]
&nbsp; &nbsp; &nbsp; &nbsp; if nom.length != 0
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; desc = $local[x][y][1]
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type = $local[x][y][3] == 0 ? "normal" : "ville"
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string = x.to_s + '.' + y.to_s + ' -> ' + nom + ' : ' + desc + '('+type+')'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; logfile.write(string)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; logfile.write("\n")
&nbsp; &nbsp; &nbsp; &nbsp; else
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; empty += 1
&nbsp; &nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; end
&nbsp; &nbsp; logfile.write("\n")
&nbsp; &nbsp; string = "Et #{empty.to_s} case"+ (empty > 1 ? "s vides." : " vide.")&nbsp; &nbsp;
&nbsp; &nbsp; logfile.write(string)
&nbsp; &nbsp; logfile.close
&nbsp; end
&nbsp; &nbsp;
end
#==============================================================================
# ■ Appel depuis la map
#
# Remplacez :
#&nbsp; &nbsp;-> Y par la touche qui ouvre la carte depuis la carte.
#&nbsp; &nbsp;-> 200 par le n°de l'interrupteur qui active cette fonction.
#
#==============================================================================
class Scene_Map
&nbsp;
&nbsp; alias map_update update
&nbsp; def update
&nbsp; &nbsp; if Input.trigger?(Input::Y) and $game_switches[200]
&nbsp; &nbsp; &nbsp; $scene = Scene_Carte.new
&nbsp; &nbsp; end
&nbsp; &nbsp; map_update
&nbsp; end
end
#==============================================================================
# ■ Interpreter
#
#&nbsp; &nbsp;Fonctions lié à la carte.
#
#==============================================================================
class Interpreter
&nbsp;
&nbsp; #--------------------------------------------------------------------------
&nbsp; # ● Init_map (facultatif) - Remise à Zéro des infos de la map.
&nbsp; #--------------------------------------------------------------------------
&nbsp; def init_map
&nbsp; &nbsp; Scene_Carte.initialize
&nbsp; end
&nbsp;
&nbsp; #--------------------------------------------------------------------------
&nbsp; # ● Init_local - Modification des infos sur un lieu (comme les "init" ligne 82)
&nbsp; #--------------------------------------------------------------------------
&nbsp; def init_local(x, y, nom, desc, type)
&nbsp; &nbsp; Scene_Carte.init(x, y, nom, desc, type)
&nbsp; &nbsp; Scene_Carte.note
&nbsp; end
&nbsp;
&nbsp; #--------------------------------------------------------------------------
&nbsp; # ● Scene_carte - Appel de la Carte
&nbsp; #--------------------------------------------------------------------------
&nbsp; def scene_carte
&nbsp; &nbsp; $scene = Scene_Carte.new
&nbsp; end
&nbsp;
&nbsp; #--------------------------------------------------------------------------
&nbsp; # ● Local - Défini la position du héro
&nbsp; #--------------------------------------------------------------------------
&nbsp; def local(x_or_name, o_y = nil)
&nbsp; &nbsp; if $local == nil
&nbsp; &nbsp; &nbsp; Scene_Carte.initialize
&nbsp; &nbsp; end
&nbsp; &nbsp; @data = []
&nbsp; &nbsp; if y == nil
&nbsp; &nbsp; &nbsp; @exist = false
&nbsp; &nbsp; &nbsp; for x in 0..$local.size-1
&nbsp; &nbsp; &nbsp; &nbsp; for y in 0..$local[x].size-1
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if $local[x][y][0] == x_or_name and !@exist
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @exist == true
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @data = [x, y]
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $local[x][y][2] = true
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp; end
&nbsp; &nbsp; &nbsp; print("le lieu : #{x_or_name} n'existe pas.") if !@exist
&nbsp; &nbsp; &nbsp; @data [1, 1] if !@exist
&nbsp; &nbsp; else
&nbsp; &nbsp; &nbsp; @data = [x_or_name, o_y]
&nbsp; &nbsp; &nbsp; $local[x_or_name][o_y][2] = true
&nbsp; &nbsp; end
&nbsp; &nbsp; $game_variables[$var_x] = @data[0]
&nbsp; &nbsp; $game_variables[$var_y] = @data[1]
&nbsp; end
&nbsp;
end



Merci d'avance ^^'

Edit: d'après Arc-Arceus, le problème viendrait de l'inexistance du script nommé "Pokemon_Option 2".
Serait-il possible de l'avoir?

Posté par Arc-Arceus le 27 Oct - 08:32 (2011)
J'ai réouvert PSP DS 0.4 : le nom du script est "Pokemon_Option*".
La variable qui pose problème est définie à la ligne 484.
Regarde si tu as ce script là et qu'il n'ait pas été modifié par inadvertance...

ÉDIT : j'ai également retrouvé sa trace dans "Scene_Title", mais ton log ne le cite pas, donc à priori il n'y a pas de problème à ce niveau là.

Posté par Girakoth le 28 Oct - 22:50 (2011)
Voilà la ligne 484 du script:

        $options[5] = "Messages/" + POKEMON_S::NAME_MSG.to_s + $options[4].to_s + ".png"

Est-ce la ligne d'origine?