Spams error like:
Code:
L 03/31/2019 - 23:17:58: [SM] Exception reported: Instruction contained invalid parameter
L 03/31/2019 - 23:17:58: [SM] Blaming: freaks\ff2_aon_pack1.ff2
L 03/31/2019 - 23:17:58: [SM] Call stack trace:
L 03/31/2019 - 23:17:58: [SM] [1] Line 152, c:\games\tf2server\tf\addons\sourcemod\scripting\freaks\ff2_aon_pack1.sp::OnGameFrame
but only if there is
GetEngineTime used.
Replaced GetEngineTime with GetGameTime and error just disappeared.
Part from code:
Code:
public void RSLD_Invoke(int client) {
int iBoss = FF2_GetBossIndex( client );
if ( iBoss == -1 )
return;
if ( g_flRSLD_ActiveUntil[ client ] == FAR_FUTURE ) { // only initialize if not already active
if ( g_iRSLD_Flags[ client ] & RSLD_FLAG_UBER )
TF2_AddCondition( client, TFCond_Ubercharged );
if ( g_iRSLD_Flags[ client ] & RSLD_FLAG_INVINCIBILITY )
SetEntProp( client, Prop_Data, "m_takedamage", 0 );
if ( g_iRSLD_Flags[ client ] & RSLD_FLAG_MEGAHEAL )
TF2_AddCondition( client, TFCond_MegaHeal );
g_flRSLD_NextTickAt[ client ] = GetEngineTime();
}
// set or extend
g_flRSLD_ActiveUntil[ client ] = GetEngineTime() + g_flRSLD_Duration[ client ];
// ...
}
public void OnGameFrame() {
if ( !g_bPluginActiveThisRound || !g_bRoundInProgress )
return;
if ( g_bRSLD_Active )
RSLD_OnGameFrame();
}
public void RSLD_OnGameFrame() {
float flCurTime = GetEngineTime();
// ...
}
Decompiler also said
ERROR PREPROCESSING! 4752 for RSLD_Invoke and RSLD_OnGameFrame (if used GetEngineTime).
I use stable SourceMod and compiler.
Code:
public PlVers __version =
{
version = 5,
filevers = "1.9.0.6276",
date = "04/01/2019",
time = "18:25:24"
};
SourceMod Version Information:
SourceMod Version: 1.9.0.6276
SourcePawn Engine: 1.9.0.6276, jit-x86 (build 1.9.0.6276)
SourcePawn API: v1 = 4, v2 = 12
Compiled on: Mar 28 2019 17:52:18
Built from: https://github.com/alliedmodders/sourcemod/commit/2bfc3499
Build ID: 6276:2bfc3499
http://www.sourcemod.net/
P.S. Compiled with AMS
__________________