![]() |
Re: FakeClientCommand
The linker cannot find where FakeClientCommand is defined..
it is externed but not defined anywhere so the function doesn't exist and the linker can't find it. |
Re: FakeClientCommand
I defined it as:
void FakeClientCommand(edict_t *pBot, char *arg1, char *arg2, char *arg3); Now, if I take it away, i get an error pointing to FakeClientCommand saying undeclared identifier. So what's the linker on about? |
Re: FakeClientCommand
do you have the body of the function defined somewhere?
|
Re: FakeClientCommand
No...
What is the code for it? |
Re: FakeClientCommand
Looking through HPB Bot and POD Bot, I can't find it.
|
Re: FakeClientCommand
Maybe you need by some more C/C++ lesons. ;)
Let me explain: So if you have the function FakeClientCommand() defined in dll.cpp and you want to use it in other *.cpp like bot.cpp you must define it as global function in some header file *.h like bot.h and you must be sure that bot.cpp will use this header. So if the function is defined in dll.cpp in this way: Code:
FakeClientCommand(bla, bla, bla) Code:
FakeClientCommand(bla, bla, bla); And now you can use FakeClientCommand() in every .cpp that will use the bot.h header file. I hope that this will help you. ;) |
Re: FakeClientCommand
...and BTW, the bot can be built either in the DEBUG or in the RELEASE configuration, the only difference will be that in the latter the debug symbols will be stripped out, whereas in the former they're here and all the variables are nulled before use - they aren't in release, their state is undefined.
|
All times are GMT +2. The time now is 17:20. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.