I'm using zombie plague's framework:
https://forums.alliedmods.net/showthread.php?t=290657
When I import ZP's code about particle to my own, I found that here is an error occurs but several months ago it could work.
PHP Code:
L 01/05/2020 - 00:53:11: [SM] Exception reported: Invalid Handle 0 (error 4)
L 01/05/2020 - 00:53:11: [SM] Call stack trace:
L 01/05/2020 - 00:53:11: [SM] [0] SDKCall
L 01/05/2020 - 00:53:11: [SM] [1] Line 170, modules/manager/visualeffects/part
icles.cpp::ParticlesFindTable
L 01/05/2020 - 00:53:11: [SM] [2] Line 51, modules/manager/visualeffects/parti
cles.cpp::ParticlesOnCacheData
The code is shown below:
PHP Code:
Handle hSDKCallContainerFindTable;
Address pNetworkStringTable;
void ParticlesOnCacheData()
{
// Validate that table is exist and it empty
Address pTable = ParticlesFindTable("ParticleEffectNames");
if(pTable != Address_Null && !ParticlesCount())
{
// Opens the file
File hFile = OpenFile("particles/particles_manifest.txt", "rt", true);
// If doesn't exist -> stop
if(hFile == null)
{
SetFailState("Error opening file: \"particles/particles_manifest.txt\"");
return;
}
// Read lines in the file
static char sPath[256];
while(hFile.ReadLine(sPath, sizeof(sPath)))
{
// Checks if string has correct quotes
int iQuotes = CountCharInString(sPath, '"');
if(iQuotes == 4)
{
// Trim string
TrimString(sPath);
// Copy value string
strcopy(sPath, sizeof(sPath), sPath[strlen("\"file\"")]);
// Trim string
TrimString(sPath);
// Strips a quote pair off a string
StripQuotes(sPath);
// Precache model
int i; if(sPath[i] == '!') i++;
PrecacheGeneric(sPath[i], true);
ParticlesClearTable(pTable); /// HACK~HACK
/// Clear tables after each file because some of them contains
/// huge amount of particles and we work around the limit
}
}
}
}
Address ParticlesFindTable(char[] sTable)
{
return SDKCall(hSDKCallContainerFindTable, pNetworkStringTable, sTable);
}
I don't know why this error occurs....
UPDATE: This problem points to find signature eventually.
It seems that Valve has changed "CParticleSystemDictionary::~CParticleSystemD ictionary" address.
But overall, it solved, for me, at least.