Page 1 of 1

Custom SFX issues

Posted: Sun Sep 05, 2021 4:19 pm
by LunarCatUSA
So in my program, I have it set to play audio at a certain tick number. In this case,

Code: Select all

if jumpcuttimer == 180 then
		SFX.play("Silverware-Hit1.mp3")
	end
	if jumpcuttimer == 505 then
		SFX.play("Silverware-Hit2.mp3")
	end
But it remains silent during this time and I get this error message when I close the game:

Code: Select all

Execution ran for 94.587999999989s (5036 ticks), and produced 2 warnings:


3850t - Warning: Could not load sound: Silverware-Hit1.mp3
stack traceback:
	scripts/base/audiomaster.lua:79: in function 'convertAudioSource'
	scripts/base/audiomaster.lua:381: in function 'play'
	...Creepshow - Town of Whispers/ToW - Family House/luna.lua:134: in function <...Creepshow - Town of Whispers/ToW - Family House/luna.lua:23>
	scripts/base/engine/main_events.lua:179: in function 'callEventInternal'
	scripts/base/engine/main_events.lua:240: in function <scripts/base/engine/main_events.lua:218>
	[C]: in function '__xpcall'
	main.lua:778: in function <main.lua:777>

4175t - Warning: Could not load sound: Silverware-Hit2.mp3
stack traceback:
	scripts/base/audiomaster.lua:79: in function 'convertAudioSource'
	scripts/base/audiomaster.lua:381: in function 'play'
	...Creepshow - Town of Whispers/ToW - Family House/luna.lua:137: in function <...Creepshow - Town of Whispers/ToW - Family House/luna.lua:23>
	scripts/base/engine/main_events.lua:179: in function 'callEventInternal'
	scripts/base/engine/main_events.lua:240: in function <scripts/base/engine/main_events.lua:218>
	[C]: in function '__xpcall'
	main.lua:778: in function <main.lua:777>
Anyone know what to do about this? I should mention that the files are 4 seconds long and are mp3 files. Don't know if that makes a difference.

Re: Custom SFX issues

Posted: Sun Sep 05, 2021 8:00 pm
by wyldstrykr
Warning: Could not load sound: Silverware-Hit1.mp3
either:
there is no Silverware-Hit1.mp3 in the same folder where that code is in.
it may be a bad file. try double clicking the file to know if it works.