But ren'py says it can't find the file, despite being defined correctly
Here's the traceback
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/credits.rpy", line 9, in script
with dissolve
IOError: Couldn't find file 'music/credits.ogg'.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/credits.rpy", line 9, in script
with dissolve
File "renpy/ast.py", line 1443, in execute
renpy.exports.with_statement(trans, paired)
File "renpy/exports.py", line 1682, in with_statement
return renpy.game.interface.do_with(trans, paired, clear=clear)
File "renpy/display/core.py", line 2752, in do_with
clear=clear)
File "renpy/display/core.py", line 3315, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
File "renpy/display/core.py", line 4020, in interact_core
renpy.audio.audio.periodic()
File "renpy/audio/audio.py", line 1162, in periodic
raise_(exc[0], exc[1], exc[2])
File "renpy/audio/audio.py", line 1140, in periodic_thread_main
periodic_pass()
File "renpy/audio/audio.py", line 1082, in periodic_pass
c.periodic()
File "renpy/audio/audio.py", line 518, in periodic
topf = load(filename)
File "renpy/audio/audio.py", line 69, in load
rv = renpy.loader.load(fn)
File "renpy/loader.py", line 798, in load
raise IOError("Couldn't find file '%s'." % name)
IOError: Couldn't find file 'music/credits.ogg'.
Windows-10-10.0.22000
Ren'Py 7.4.10.2178
LibitinaV2 1.0
Thu Dec 23 12:01:16 2021
Code: Select all
define audio.cmusic = ("music/credits1.wav")
Code: Select all
label credits:
$ credits_speed = 25 #scrolling speed in seconds
scene black #replace this with a fancy background
with dissolve
play music cmusic
show theend:
yanchor 0.5 ypos 0.5
xanchor 0.5 xpos 0.5
with dissolve
with Pause(3)
hide theend
show cred at Move((0.5, 5.0), (0.5, 0.0), credits_speed, repeat=False, bounce=False, xanchor="center", yanchor="bottom")
with Pause(credits_speed)
show thanks:
yanchor 0.5 ypos 0.5
xanchor 0.5 xpos 0.5
with dissolve
with Pause(3)
hide thanks
return
And how do I fix it?
And yes, I've made sure the audio is in the right directory etc.