Godot Version
4.2.1 stable
Question
Hi! So I cant seem to figure out why I keep getting this error message in the debugger whenever the sound plays. It only has to do with the pitch scale as when I take it off it is completely fine. Below is the code, and below that is the error message!
func _process(delta: float) → void:
if Input.is_action_just_pressed(“Knock”):
var pitch = rng.randi_range(0.5, 2.5)
%KnockingSound.play()
%KnockingSound.set_pitch_scale(pitch)
error message:
E 0:00:05:0013 main.gd:45 @ _process(): Condition “!(p_pitch_scale > 0.0)” is true.
<C++ Source> scene/2d/audio_stream_player_2d.cpp:243 @ set_pitch_scale()
main.gd:45 @ _process()
thanks!