I tried that,
vgui::localize()->Find()
That works in the client project, in the hl project it's a no-go even if
I include the file.
Skyler York wrote:
You can't just declare a pointer and then try to make a function call
from it. It doesn't point to anything!
The proper way is to use the localize() function:
wchar_t *token_modelName_localized = localize()->Find(token_modelname);
Kamran wrote:
I'm having some trouble finding tokens within the HL project...
I got it to compile using this code:
#include "vgui/ILocalize.h"
...
vgui::ILocalize *localize;
char *token_modelname;
Q_snprintf(token_modelname, sizeof(ModelName) + 1, "#%s", ModelName);
wchar_t *token_modelName_localized = localize->Find(token_modelname);
It crashes on:
wchar_t *token_modelName_localized = localize->Find(token_modelname);
I break in the debugger and it says "Access violation" and when I quit
it says "pure virtual function call".
--
Kamran A
Get Firefox! Safer, Faster, Better.
<http://www.spreadfirefox.com/?q=affiliates&id=0&t=85>
Down with Internet Explorer! Say "NO!" to Spyware! Use Firefox
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
--
Kamran A
Get Firefox! Safer, Faster, Better.
<http://www.spreadfirefox.com/?q=affiliates&id=0&t=85>
Down with Internet Explorer! Say "NO!" to Spyware! Use Firefox
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders