Hello, i have an error when hatching an egg.
the pokemon appears and maybe the cry should follow but then the errors shows up.
the errors says:
Script "PSystem_FileUtilities' line 425: ArgumentError aoourred.
wrong number of arguments (2 for 1)
what does that mean? :-(
this is the script part:
if you could help, this would be perfect :-)
the pokemon appears and maybe the cry should follow but then the errors shows up.
the errors says:
Script "PSystem_FileUtilities' line 425: ArgumentError aoourred.
wrong number of arguments (2 for 1)
what does that mean? :-(
this is the script part:
Code:
#===============================================================================
# Analyse audio files
#===============================================================================
def pbResolveAudioSE(file)
return nil if !file
if RTP.exists?("Audio/SE/"+file,["",".wav",".mp3",".ogg"])
return RTP.getPath("Audio/SE/"+file,["",".wav",".mp3",".ogg"])
end
return nil
end
def pbCryFrameLength(pokemon,form=0,pitch=nil)
return 0 if !pokemon
pitch = 100 if !pitch
pitch = pitch.to_f/100
return 0 if pitch<=0
playtime = 0.0
if pokemon.is_a?(Numeric)
pkmnwav = pbResolveAudioSE(pbCryFile(pokemon,form))
playtime = getPlayTime(pkmnwav) if pkmnwav
elsif !pokemon.egg?
if pokemon.respond_to?("chatter") && pokemon.chatter
playtime = pokemon.chatter.time
pitch = 1.0
else
pkmnwav = pbResolveAudioSE(pbCryFile(pokemon))
playtime = getPlayTime(pkmnwav) if pkmnwav
end
end
playtime /= pitch # sound is lengthened the lower the pitch
# 4 is added to provide a buffer between sounds
return (playtime*Graphics.frame_rate).ceil+4
end
if you could help, this would be perfect :-)
Last edited by a moderator: