View Single Post
PB crashes after typing "meta unload podbot"
Old
  (#1)
Immortal_BLG
Member
 
Status: Offline
Posts: 171
Join Date: Nov 2007
Location: Russian Federation
Default PB crashes after typing "meta unload podbot" - 07-03-2012

Why?: because when metamod unloads your module, attempts of engine to reference any string in the podbot will produce a segfault. For now metamod protects only console variables and commands from it.

Solution: For the engine functions such as "PRECACHE_*", "SET_MODEL" and "MAKE_STRING" transfer of the string to argument of this functions should look like this:
Code:
282: PRECACHE_SOUND (STRING (ALLOC_STRING ("weapons/xbow_hit1.wav")));
286: m_spriteTexture = PRECACHE_MODEL (STRING (ALLOC_STRING ("sprites/lgtning.spr")));
319: pent->v.target = ALLOC_STRING ("fake");
Note: This is just a examples, you have to do it for all functions (PRECACHE_*, SET_MODEL and MAKE_STRING - maybe this is not a complete list....)

P.S. Sorry for bad english.
  
Reply With Quote