Quote:
Originally Posted by Dominatez
It's constantly spamming the error log all the time with this.
L 02/20/2020 - 20:23 1: [SM] Exception reported: Invalid entity index -1
L 02/20/2020 - 20:23 1: [SM] Blaming: 200IQBots_FlyYouFools.smx
L 02/20/2020 - 20:23 1: [SM] Call stack trace:
L 02/20/2020 - 20:23 1: [SM] [0] EntIndexToEntRef
L 02/20/2020 - 20:23 1: [SM] [1] Line 127, 200IQBots_FlyYouFools.sp::L4D2_RunScript
L 02/20/2020 - 20:23 1: [SM] [2] Line 86, 200IQBots_FlyYouFools.sp::BotControlTimer
Any ideas ?
|
It's referring to the stock Timocop has provided
Code:
stock L4D2_RunScript(const String:sCode[], any:...)
{
static iScriptLogic = INVALID_ENT_REFERENCE;
if(iScriptLogic == INVALID_ENT_REFERENCE || !IsValidEntity(iScriptLogic)) {
iScriptLogic = EntIndexToEntRef(CreateEntityByName("logic_script"));
if(iScriptLogic == INVALID_ENT_REFERENCE || !IsValidEntity(iScriptLogic))
SetFailState("Could not create 'logic_script'");
DispatchSpawn(iScriptLogic);
}
static String:sBuffer[512];
VFormat(sBuffer, sizeof(sBuffer), sCode, 2);
SetVariantString(sBuffer);
AcceptEntityInput(iScriptLogic, "RunScriptCode");
}
This specific line "iScriptLogic = EntIndexToEntRef(CreateEntityByName("logic_sc ript"));" has an issue in L4D1 and I don't know why, but this did work before.