.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
FakeClientCommand
Old
  (#1)
andrewcaus
Member
 
Status: Offline
Posts: 15
Join Date: Jul 2005
Default FakeClientCommand - 21-08-2005

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.
  
Reply With Quote
Re: FakeClientCommand
Old
  (#2)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: FakeClientCommand - 21-08-2005

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.
  
Reply With Quote
Re: FakeClientCommand
Old
  (#3)
andrewcaus
Member
 
Status: Offline
Posts: 15
Join Date: Jul 2005
Default Re: FakeClientCommand - 21-08-2005

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)
Attached Thumbnails
Click image for larger version

Name:	untitled.JPG
Views:	549
Size:	74.1 KB
ID:	713  

Last edited by andrewcaus; 21-08-2005 at 11:46..
  
Reply With Quote
Re: FakeClientCommand
Old
  (#4)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: FakeClientCommand - 21-08-2005

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

Last edited by sPlOrYgOn; 21-08-2005 at 15:10..
  
Reply With Quote
Re: FakeClientCommand
Old
  (#5)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: FakeClientCommand - 21-08-2005

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.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: FakeClientCommand
Old
  (#6)
andrewcaus
Member
 
Status: Offline
Posts: 15
Join Date: Jul 2005
Default Re: FakeClientCommand - 22-08-2005

How does it expect to find it?

Sorry for all these questions, just not the most fluent programmer there is.
  
Reply With Quote
Re: FakeClientCommand
Old
  (#7)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: FakeClientCommand - 22-08-2005

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.

Last edited by The Storm; 22-08-2005 at 10:07..
  
Reply With Quote
Re: FakeClientCommand
Old
  (#8)
andrewcaus
Member
 
Status: Offline
Posts: 15
Join Date: Jul 2005
Default Re: FakeClientCommand - 22-08-2005

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)
  
Reply With Quote
Re: FakeClientCommand
Old
  (#9)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: FakeClientCommand - 22-08-2005

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.

Last edited by The Storm; 22-08-2005 at 13:58..
  
Reply With Quote
Re: FakeClientCommand
Old
  (#10)
andrewcaus
Member
 
Status: Offline
Posts: 15
Join Date: Jul 2005
Default Re: FakeClientCommand - 22-08-2005

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.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com