.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 1 SDK (http://forums.bots-united.com/forumdisplay.php?f=33)
-   -   Custom dll bot loading problem (http://forums.bots-united.com/showthread.php?t=5475)

The_Hard_Mission_Guy 06-07-2006 12:23

Custom dll bot loading problem
 
Allowa
I'm experimenting with whistler's version of the Hpb-bot for Ricochet called "Ricobot" and it seems that I'm facing a small but strange problem!

First when I add the rest of the cpp's and h's from botman's package and then compile it using MSVC++ 6 , everything goes as it should and I get a nice Dll.

but when I delete the default project files that come with Ricobot or Hpb_bot , start a new Dll project , add all the headers and sources and then compile the Dll(which is compiled successfully) I get an error message while loading the map in ricochet , saying something like can't load Dll Api

I tried everything but till now I can't find the error ( yes I checkd liblist.gam)
I suspect the mistake to be somewhere in the project files , but I can't locate the problem.......

remember the Dll compiles correctly without complaints , but it can't be loaded by the HL engine for some reason..

Help is urgently appreciated:chinese:

The Storm 06-07-2006 22:08

Re: Custom dll bot loading problem
 
The Windows version of the HL engine like every version of VC++. :)
The problem probably come from the exporting of GiveFnptrsToDll i.e. from the file bot.def.
Better forget about that file and use the way that Jozef Wagner showed us.
Its better and less compicated.
Just add this code
Code:

// If we're using MSVC, we need to specify the export parameter (Thanks Jozef Wagner)...
#if _MSC_VER > 1000
#pragma comment(linker, "/EXPORT:GiveFnptrsToDll=_GiveFnptrsToDll@8,@1")
#pragma comment(linker, "/SECTION:.data,RW")
#endif

In h_export.cpp righ after the function DllMain.
Recompile and fun. :)

The_Hard_Mission_Guy 08-07-2006 06:38

Re: Custom dll bot loading problem
 
Yes exactly , the problem lies in GiveFnptrsToDll !
because that's the function that the HL engine complains about NOt being able to load it:)
by the way when I look at the function export list using dumpbin , I see GiveFnptrsToDll's name being changed to "GiveFnptrsToDll@8" ! Weird heh?

I'm right now making a new DLL project , in order to try this code out!!

The_Hard_Mission_Guy 08-07-2006 07:10

Re: Custom dll bot loading problem
 
It Works :clap: , that was a step into the right direction , thanks to this guy Jozef Wagner!
Unfortunately I haven't heard of him before , I guess he is a celebrity in the bot community like Botman , Who is He?

Now I can focus on the real coding job , in the meantime I've become a bad-ass ricochet decapitator !:death:
After easing it a little bit by removing the BotShootatEnemy() function , LOL:P
I wonder if I can snatch 2 bots in one Hit......

The Storm 08-07-2006 11:36

Re: Custom dll bot loading problem
 
Here Jozef Wagner is known as Korax. Now maybe you can remember who is he. ;)

The_Hard_Mission_Guy 08-07-2006 12:17

Re: Custom dll bot loading problem
 
Korax , Korax .......no that name doesn't ring any bells , sorry:blush:
wait .....in wikipedia Korax is documented as the final boss of the fps game Hexen...
but that's really everything this name says to me..

but I'm sure your gonna tell me more , right?:shaun:

The Storm 08-07-2006 13:04

Re: Custom dll bot loading problem
 
Use the forum search.

The_Hard_Mission_Guy 08-07-2006 13:07

Re: Custom dll bot loading problem
 
OK I got a little bit smarter about this guy KoraX!
I see he has a broad programming profile , nice indeed!
I think we share some similarities ragarding the AI stuff ( Neural Networks & Gennetic Algorithms)
But I didn't actually "remember" him , I just learned about him a couple minutes ago , can't recgonize meeting him somewhere before..

The Storm 08-07-2006 22:32

Re: Custom dll bot loading problem
 
Well I think that you are registered here not from long(at last you say so).

The_Hard_Mission_Guy 09-07-2006 04:34

Re: Custom dll bot loading problem
 
you probably thought that I have been for a longer time here , but I've been here for the first time in May 2006 .


All times are GMT +2. The time now is 11:38.

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