View Single Post
Re: PB crashes after typing "meta unload podbot"
Old
  (#3)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: PB crashes after typing "meta unload podbot" - 10-03-2012

Quote:
Originally Posted by KWo View Post
If I have already allocated a memory area for precached model, what should I use in SET_MODEL function then? I don't think I need to allocate the memory the second time for the model name... I believe I should store somewhere the pointer to that area of precached model, then I should use this pointer somehow in SET_MODEL function. Can You describe it more clearly? My skill of C++ coding seems to be still really poor comparing to skill of other developers at this forum...

[EDIT]
After compilation I'm getting such errors:
282: PRECACHE_SOUND (STRING (ALLOC_STRING ("weapons/xbow_hit1.wav"))); // waypoint add

1>.\dll.cpp(282) : error C2664: 'int (char *)' : cannot convert parameter 1 from 'const char *' to 'char *'

Can You help with this?
try casting the string to (char *)
PRECACHE_SOUND (STRING (ALLOC_STRING ((char *)"weapons/xbow_hit1.wav")))

or (more C++'ish):
PRECACHE_SOUND (STRING (ALLOC_STRING (reinterpret_cast<char *>("weapons/xbow_hit1.wav"))))
  
Reply With Quote