O knowledgeable guru, I need thy immense wisdom again...
... and especially your ability to check one thing or two in the Half-Life source code, if you don't mind
I've f*ckedup a metamod plugin, but completely, and as usuals I didn't make backups. That's because the error only occurs on some situations and I never noticed it before. But it's very reproductible indeed: the plugin is Count Floyd's POD-bot, and the crash occurs randomly although very often, only on "cs_" maps, i.e, maps with hostages. The error I get is:
NUM_FOR_EDICT: bad pointer.
Does this sound familiar to you ??
I scoured the source code again and again to no avail. I'm becoming desperate as I need this stupid error to be fixed quickly in order to make a release of this bot and move on to other things (mine, and the united bot thingy). And where I enrage is when I see that the engine exits gracefully with a nice MessageBox, and who says messagebox says no real crash, and who says no crash says NO BREAK IN THE FRIKKIN DEBUGGER !!! I don't give a foack about message boxes, I ONLY WISHED MY DEBUGGER WOULD KICK IN RIGHT AT THE ERROR !!!
If (and as I believe) that's impossible, could you have a look in the engine source code and tell me where are the main places where this error can occur ? I assume the bot is calling an engine function with a fucked parameter, but if I could narrow down my search and avoid checking one after the other the 5,000 engine function calls there are in this stupid bot source code I would be quite pleased. What does this error mean ? I thought it was related to INDEXENT() and ENTINDEX() where you would for example ask the engine for a pointer to an edict_t by number, and passing a number out of range, but I've quintuple-checked these two everywhere I could find them to no avail.
I'm clueless ! What does this error mean ? In which engine function(s) does it kick in ? Please don't tell me "everywhere", I would go mad, please :'(