AlliedModders Donor
Join Date: May 2017
Location: Crashing Hale
01-08-2019
, 00:51
SV_StartSound: not precached(0)
#1
I'm getting a pretty wicked console error.
This...
does not look right...
at all.
It only shoots off whenever a round begins/ends and randomly in the midround. And it comes in
waves .
What I do know is that it has something to do with forwards that I'm using, I think. I hate to just slap code down, but I don't know what else I'm supposed to do. However, this wasn't happening when I had a bunch of really random, unnecessary flags when I passed forward params with PushStringEx().
Only including the forwards that have PushStringEx:
Spoiler
PHP Code:
void InitializeForwards ()
{
hPrivFwds [ OnHudShow ] = CreateForward ( ET_Ignore , Param_String );
hPrivFwds [ OnMenuAdd ] = CreateForward ( ET_Ignore , Param_Cell , Param_CellByRef , Param_String );
hPrivFwds [ OnPanelAdd ] = CreateForward ( ET_Ignore , Param_Cell , Param_String );
hPrivFwds [ OnSoundHook ] = CreateForward ( ET_Hook , Param_Array , Param_CellByRef , Param_String , Param_Cell , Param_CellByRef , Param_FloatByRef , Param_CellByRef , Param_CellByRef , Param_CellByRef , Param_String , Param_CellByRef );
hPrivFwds [ OnPlayMusic ] = CreateForward ( ET_Hook , Param_String , Param_FloatByRef );
}
void Call_OnHudShow ( char hud [ 128 ])
{
Call_StartForward ( hPrivFwds [ OnHudShow ]);
Call_PushStringEx ( hud , 128 , 0 , SM_PARAM_COPYBACK );
Call_Finish ();
}
void Call_OnMenuAdd (const int index , int & max , char name [ 32 ])
{
Call_StartForward ( hPrivFwds [ OnMenuAdd ]);
Call_PushCell ( index );
Call_PushCellRef ( max );
Call_PushStringEx ( name , 32 , SM_PARAM_STRING_COPY , SM_PARAM_COPYBACK );
Call_Finish ();
}
void Call_OnPanelAdd (const int index , char name [ 64 ])
{
Call_StartForward ( hPrivFwds [ OnPanelAdd ]);
Call_PushCell ( index );
Call_PushStringEx ( name , 64 , SM_PARAM_STRING_COPY , SM_PARAM_COPYBACK );
Call_Finish ();
}
Action Call_OnPlayMusic ( char song [ PLATFORM_MAX_PATH ], float & time )
{
Action action = Plugin_Handled ;
Call_StartForward ( hPrivFwds [ OnPlayMusic ]);
Call_PushStringEx ( song , PLATFORM_MAX_PATH , 0 , SM_PARAM_COPYBACK );
Call_PushFloatRef ( time );
Call_Finish ( action );
return action ;
}
Action Call_OnSoundHook ( int clients [ 64 ], int & numClients , char sample [ PLATFORM_MAX_PATH ], JailFighter player , int & channel , float & volume , int & level , int & pitch , int & flags , char soundEntry [ PLATFORM_MAX_PATH ], int & seed )
{
Action action = Plugin_Continue ;
Call_StartForward ( hPrivFwds [ OnSoundHook ]);
Call_PushArrayEx ( clients , 64 , SM_PARAM_COPYBACK );
Call_PushCellRef ( numClients );
Call_PushStringEx ( sample , PLATFORM_MAX_PATH , SM_PARAM_STRING_COPY , SM_PARAM_COPYBACK );
Call_PushCell ( player );
Call_PushCellRef ( channel );
Call_PushFloatRef ( volume );
Call_PushCellRef ( level );
Call_PushCellRef ( pitch );
Call_PushCellRef ( flags );
Call_PushStringEx ( soundEntry , PLATFORM_MAX_PATH , SM_PARAM_STRING_COPY , SM_PARAM_COPYBACK );
Call_PushCellRef ( seed );
Call_Finish ( action );
return action ;
}
Also, doesn't this error have to do with playing sounds that aren't precached? How in the hell is any of this somehow related.
__________________