View Single Post
Re: FakeClientCommand
Old
  (#16)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Re: FakeClientCommand - 22-08-2005

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)
{
// bot code 
}
you must define again that function for global to use it everywere in some header like bot.h in this way:
Code:
FakeClientCommand(bla, bla, bla);
But in to the header don't define the hole function again with the code, just define only the name 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.
  
Reply With Quote