Bonjour,
Alors voilà j'ai un bug qui se produit uniquement pour les combats de dresseurs. Les combats contre pokémon sauvage marche bien mais pas les dresseurs
Voilà ce qu'il me dit.
[spoiler=Spoiler]
[img]http://img.xooimage.com/files24/1/f/0/api-21dd5e0.png[/img][img]http://img.xooimage.com/files42/7/2/e/cannot-21dd5e5.png[/img][/spoiler]
Le fichier log que voici :
[code]
---------- Erreur de script : API --------------- TypeTypeError----- Messagecannot convert nil into String
----- Position dans API
Ligne 1
----- Backtrace
Script : API | Ligne : 1 | Méthode : in `+'
Script : API | Ligne : 1 | Méthode : in `load_bitmap'
Script : API | Ligne : 1 | Méthode : in `battler'
Script : Pokemon_Battle_Trainer* | Ligne : 177 | Méthode : in `pre_battle_transition'
Script : Pokemon_Battle_Core 1* | Ligne : 228 | Méthode : in `main'
Script : Main | Ligne : 58
[/code]Et le code ou il y a l'erreur :
[code]
def pre_battle_transition
# Jingle et BGM
$game_system.bgm_play($game_system.battle_bgm)
Audio.me_play("Audio/ME/battle_jingle.mid")
Graphics.freeze
# Sélection transition
s = (rand(BATTLE_TRANS)+1).to_s
@background.bitmap = RPG::Cache.picture("black.png")
Graphics.transition(100, "Graphics/Transitions/battle"+ s +".png")
Audio.me_stop
# Dessin
Graphics.freeze
@background.bitmap = RPG::Cache.battleback(@battleback_name)
@message_background.bitmap = RPG::Cache.picture($MSG)
@enemy_sprite.bitmap = RPG::Cache.battler(@start_enemy_battler, 0) #<=== Ligne qui bug
@enemy_sprite.ox = @enemy_sprite.bitmap.width / 2
@enemy_sprite.oy = @enemy_sprite.bitmap.height * 2 / 3
@enemy_sprite.x -= 782 #254 #782
@enemy_sprite.y = 95
@enemy_ground.bitmap = RPG::Cache.battleback(@ground_name)
@enemy_ground.ox = @enemy_ground.bitmap.width / 2
@enemy_ground.oy = @enemy_ground.bitmap.height / 2
[url=mailto:#@enemy_ground.zoom_x]#@enemy_ground.zoom_x[/url] = @enemy_ground.zoom_y = 2.0/3
@enemy_ground.x -= 782 #254 #782
@actor_ground.bitmap = RPG::Cache.battleback(@ground_name_actor)
@actor_ground.ox = @actor_ground.bitmap.width / 2
@actor_ground.oy = @actor_ground.bitmap.height
@actor_ground.x += 782 #286 #782
@actor_sprite.bitmap = RPG::Cache.battler(@start_actor_battler, 0)
@actor_sprite.ox = @actor_sprite.bitmap.width / 2
@actor_sprite.oy = @actor_sprite.bitmap.height
@actor_sprite.x += 782 #286 #782
Graphics.transition(50, "Graphics/Transitions/battle0.png")
end
[/code]