system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
givenmnisi6 |
try:
$AudioStreamPlayer.stream = load("res://Audio/Voice/" + story[i_story] + str(tot_count) + ".wav")
$AudioStreamPlayer.play()
except:
pass
$PageTurn.frame = 0
system
2
|
|
|
|
Reply From: |
Mr. Gamezz |
I’m pretty sure it’s because Godot doesn’t offer try or except. You need to use if err == OK: when you attempt to load it, try this:
error = load("res://Audio/Voice/" + story[i_story] + str(tot_count) + ".wav")
if error == OK:
$AudioStreamPlayer.stream = load("res://Audio/Voice/" + story[i_story] + str(tot_count) + ".wav")
$AudioStreamPlayer.play()