Quote:
Originally Posted by Ilusion9
|
Which game? Which plugin version? You modified that (and removed stuff?) why?
It has a specific check for reading "InValue" commands which would crash when reading with any other method, there maybe other commands which need to be read as objects instead, you can debug where its crashing by printing/logging the "command" variable value and seeing the last one printed before crash, and let me know what it is so I can fix the plugin.
Quote:
Originally Posted by Ilusion9
He does the same thing here:
PHP Code:
if( pThis < 0 )
pThis = EntRefToEntIndex(pThis);
And I've seen entities with negative values or higher than 4096, I thought entities can only have indexes between 0 and 4096..,
|
Because negative entity indexes are more than likely going to be entity references which is used by non-networked entities (their index is > 2048 or > 4096 depending on the game and their max entity limits). See the
[TUT] SourcePawn Scripting - Tips, Basics to Advanced for more details.
The plugin should probably be checking EntRefToEntIndex != INVALID_ENT_REFERENCE after converting but I don't see why an input triggered at this stage would ever be an invalid entity (probably the reason I left out the check to see if anyone reports an invalid entity error - I specifically do this for various plugins where I think a check would not have to be required and wait for any error reports, rarely some trigger errors and sometimes only very rarely).
__________________