So I was working with a forward to play music during gameplay with a sub-plugin. But I've run into a bit of a wall. I've consistantly got this error:
Which also spewed "instanced_scripted_scene" occasionally
I've got a repeating timer that does some stuff but also checks to see if music is playing. If no music is playing, then it it fires some functions to see if any exist. Shown below:
Spoiler
PHP Code:
public void _MusicPlay()
{
if (gamemode.iRoundState != StateRunning)
return;
char sound[PLATFORM_MAX_PATH] = "";
float time = -1.0;
if (ManageMusic(sound, time) != Plugin_Continue) // This always returns Plugin_Continue
return;
if (sound[0] != '\0')
{
float vol = cvarTF2Jail[MusicVolume].FloatValue;
strcopy(BackgroundSong, PLATFORM_MAX_PATH, sound);
for (int i = MaxClients; i; --i)
{
if (!IsClientInGame(i))
continue;
#if defined _clientprefs_included
if (JailFighter(i).bNoMusic)
continue;
#endif
// OnPlayMusic
function Action (char song[PLATFORM_MAX_PATH], float & time); // Under a typeset, SDKHooks-style
Song was either that question mark symbol or "instanced_scripted_scene". ALWAYS returned -1.0. ALWAYS returned something other than Plugin_Handled.
I also tried it with void/ET_Ignore but got the same issue. I genuinely dunno.
For now I just cheesed it to where if time is -1.0 the entire _MusicPlay() function just returns.