Raised This Month: $535 Target: $400

Solved [HELP] Particle precache with invalid handle

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
AlliedModders Donor
Join Date: Nov 2019
Location: m_iName
Old 01-04-2020 , 13:07   [HELP] Particle precache with invalid handle
Reply With Quote #1

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: [SMException reportedInvalid Handle 0 (error 4)
L 01/05/2020 00:53:11: [SMCall stack trace:
L 01/05/2020 00:53:11: [SM]   [0SDKCall
L 01
/05/2020 00:53:11: [SM]   [1Line 170modules/manager/visualeffects/part
L 01
/05/2020 00:53:11: [SM]   [2Line 51modules/manager/visualeffects/parti
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");
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\"");

// Read lines in the file
static char sPath[256];
// Checks if string has correct quotes
int iQuotes CountCharInString(sPath'"');
iQuotes == 4)
// Trim string

// Copy value string
strcopy(sPathsizeof(sPath), sPath[strlen("\"file\"")]);
// Trim string
// Strips a quote pair off a string 

// 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)

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.

Last edited by laper32; 01-05-2020 at 03:08.
laper32 is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 01:53.

Powered by vBulletin®
Copyright ©2000 - 2023, vBulletin Solutions, Inc.
Theme made by Freecode