.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   FakeClientCommand (http://forums.bots-united.com/showthread.php?t=4377)

andrewcaus 21-08-2005 10:42

FakeClientCommand
 
I'm having some problems when it comes to the bots selecting a team. I get this issue when compiling:

Code:


--------------------Configuration: dll - Win32 Debug--------------------
Linking...
  Creating library .\Debug/csbots.lib and object .\Debug/csbots.exp
dllapi.obj : error LNK2001: unresolved external symbol "void __cdecl FakeClientCommand(struct edict_s *,char *,char *,char *)" (?FakeClientCommand@@YAXPAUedict_s@@PAD11@Z)
.\Debug/csbots.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
csbots.dll - 2 error(s), 0 warning(s)

My FakeClientCommand line:

Code:

FakeClientCommand(pEdict, "jointeam", "2", NULL);
I think this may have to do with these warnings I get where I put in the code:

Code:

D:\Documents and Settings\Administrator.ANDREW\My Documents\csbots\dllapi.cpp(66) : warning C4700: local variable 'pEdict' used without having been initialized
If so, how do I initialize pEdict? I searched the HPBBot source code but couldn't find where it did it.

The Storm 21-08-2005 11:17

Re: FakeClientCommand
 
For firs time I see FakeClientCommand() like this one that you show off
FakeClientCommand(struct edict_s *,char *,char *,char *)
Check the headers files *.h and see is the FakeClientCommand() is defined correct there. And don't debug the bot. Configurate it for Release. ;)

andrewcaus 21-08-2005 11:33

Re: FakeClientCommand
 
1 Attachment(s)
Setting it to release doesn't work. How should it be defined exactly? And I don't think I have defined pEdict correctly either, how do I do that?

(attached a screenshot)

sPlOrYgOn 21-08-2005 15:05

Re: FakeClientCommand
 
/* I should never post without reading more..
* and never post when sleepy..
*/

Pierre-Marie Baty 21-08-2005 15:52

Re: FakeClientCommand
 
this
Code:

error: unresolved external symbol
means that you prototyped a function that doesn't exist in your project. It literally means: "hey, it's the linker here. The C compiler gave me a compiled C file in which there is a call for a function that's in another file, but I don't know where in hell I can find it, and it didn't told me either, so I don't know what to do!"

Check if that function exists the way the linker expects to find it. And ignore that warning, it will get away when the problem will be solved.

andrewcaus 22-08-2005 08:45

Re: FakeClientCommand
 
How does it expect to find it?

Sorry for all these questions, just not the most fluent programmer there is. :)

The Storm 22-08-2005 09:56

Re: FakeClientCommand
 
As I see you are fixed the problem with FakeClientCommand().
And it seems that you want to make new bot for CS ?
Well isn't your CS version too old? I think that is CS 1.0.
Better update to 1.5 or 1.6 and then try again to add bots.
And btw to make bot to join directly in team 2 your must call FakeClientCommand() like this one:
Code:

FakeClientCommand (pEdict, "menuselect", "2", NULL);
After that to select a class like 3 it must be:
Code:

FakeClientCommand (pEdict, "menuselect", "3", NULL);
So you can try again. ;)

andrewcaus 22-08-2005 10:03

Re: FakeClientCommand
 
Yes, I have added those to commands, but I get a link error:

Linking...
Creating library .Debug/csbots.lib and object .Debug/csbots.exp
dllapi.obj
: error LNK2001: unresolved external symbol "void __cdecl FakeClientCommand(struct edict_s *,char *,char *,char *)" [color=#000000]([email=[/color]"?FakeClientCommand@@YAXPAUedict_s@@PAD11@Z"]?FakeClientCommand@@YAXPAUedict_s@@PAD11@Z[/email])
.Debug
/csbots.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
csbots.dll - 2 error(s), 0 warning(s)

The Storm 22-08-2005 10:10

Re: FakeClientCommand
 
I told you - Don't debug the bot. It must be for release.
After that Pierre-Marie Baty told you how to fix the problem.

andrewcaus 22-08-2005 10:10

Re: FakeClientCommand
 
I just searched the HPB Bot and POD Bot source and it doesn't do anything I haven't done. Is there some code I can use to declare it again or something? I dunno, I'm lost.


All times are GMT +2. The time now is 08:20.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.