IsMusicIDLoaded(n)
Posted: Sun Oct 27, 2024 2:32 pm
I just noticed there is no way to check if some specific music ID is actually loaded or not.
This isn't a big deal, but I have this very simple function, which is part of Music related functions:
However, I just realized there can come a situation where this p_Music.Stop() is called before any music is loaded, which crashes it.
So I started Looking for something like IsMusicIDLoaded, but couldn't find one.
This means that either I have to load some music into ID 1 myself, even I never play it, or I have to have some sort of Variable which keeps info whether this ID 1 is occupied or not, and then check it before using StopMusic(1).
Would be handy to have something like IsMusicIDLoaded(n)
This isn't a big deal, but I have this very simple function, which is part of Music related functions:
Code: Select all
Function p_Music.Stop()
StopMusic(1)
EndFunctionSo I started Looking for something like IsMusicIDLoaded, but couldn't find one.
This means that either I have to load some music into ID 1 myself, even I never play it, or I have to have some sort of Variable which keeps info whether this ID 1 is occupied or not, and then check it before using StopMusic(1).
Would be handy to have something like IsMusicIDLoaded(n)