Custom SFX issues

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

LunarCatUSA
Monty Mole
Monty Mole
Posts: 115
Joined: Sat Mar 06, 2021 9:56 am
Flair: Soda-Butler

Custom SFX issues

Postby LunarCatUSA » Sun Sep 05, 2021 4:19 pm

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.

wyldstrykr
Buster Beetle
Buster Beetle
Posts: 84
Joined: Mon May 31, 2021 11:20 pm

Re: Custom SFX issues

Postby wyldstrykr » Sun Sep 05, 2021 8:00 pm

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.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari