Bennu Game Development

English Forums => Helpdesk => Topic started by: Jongf7 on December 17, 2009, 02:23:35 PM

Title: Loading Mod
Post by: Jongf7 on December 17, 2009, 02:23:35 PM
Hi,

I'm new to Bunnu, but I have experience in both DIV Gamestudio (I & II) and Fenix.

Trying to start a project in Bunnu I directly run in to the problem that I can't load the mod files, which are essential I believe.
I get the following error: "Library "mod_video.dll" not found ("mod_video")

The start of my code is:

import "mod_video"
import "mod_key"
import "mod_proc"
import "mod_map"

begin


Do I have to place my .prg on a special location? or the DLL files?
I have tried copying all the dll files into the same folder as the .prg and having the libs\modules\externals maps in the map where I had the .prg located. Non of these actions seemed to work.
Title: Re: Loading Mod
Post by: FreeYourMind on December 17, 2009, 03:03:59 PM
I put all files in the same directory and i don't have any problems.
Title: Re: Loading Mod
Post by: Windgate on December 17, 2009, 08:43:53 PM
You can check how I do that on my tutorial:

http://trinit.es/videojuegos/Videojuego%20Tema%204.zip (http://trinit.es/videojuegos/Videojuego%20Tema%204.zip)

It is the first game example with all .dll files needed. It keeps the game's directory clean of .dll by using a import.prg, check it.
Title: Re: Loading Mod
Post by: Jongf7 on December 18, 2009, 12:47:26 PM
Thanks for your answers.

Windgate, I tried compiling your tutorial but got the exact same error.
I have just unpacked your zip, I didn't edit anything in the code.
I did however copy the compile and run file to the main directory because I don't know how to compile otherwise.
I have attached a screenshot of the error, I hope you can help me find the problem because I would love to start programming again.
Title: Re: Loading Mod
Post by: Windgate on December 18, 2009, 12:59:08 PM
You don't have to copy anything on my .zip

Just unzip it and run the .bat, that's all, don't modify anything!

My tutorial is for very lammers :P

EDIT: And check what you are writting on console, you have writen vsdeojuego.prg and vedeojuego.prg, the name is videojuego.prg... Anyway, just use the .bat and it is done.
Title: Re: Loading Mod
Post by: Jongf7 on December 18, 2009, 02:10:10 PM
I know, but the last time I wrote it right, the two times I miss spelt the file name it just gave a file not found error.

Running the .bat file did work fine. But when I tried to ad an other mod file (mod_mouse) I ran into the same problem again, even with your bat file.
I copied the mod_mouse.dll and the libmouse.dll to the DLL directory and added.

import "mod_mouse";

to the import.prg

As long as I don't understand why your file works but mine doesn't it does not help me much I'm afraid.
But don't get me wrong, I really appreciate the help here!

Next thing I am going to do is try it on my laptop when I get home, don't see why that would make a difference but its worth the try.
Title: Re: Loading Mod
Post by: Windgate on December 18, 2009, 02:45:51 PM
Dude, if you add:

import "mod_mouse"

To the /DLL/import.prg be sure that the file mod_mouse.dll is copied at /DLL/

That tutorial samples has all needed .dll files at /DLL/ and if you want to import your own .dll you have to "physically" copy it at the forlder :D

Now you must have no more problems, I must add a readme advicing that... Thanks for the "bug" reporting :P
Title: Re: Loading Mod
Post by: Jongf7 on December 18, 2009, 03:16:08 PM
Dude, as stated in my last post, I did physically add the needed dll files to the /DLL/ folder ;).

QuoteI copied the mod_mouse.dll and the libmouse.dll to the DLL directory

As said earlier, I have used DIV gamestudio and Fenix a lot, so I'm no total beginner here.
I think I know how the importing of the mod files should work, and there lies the problem, it doesn't :).
Only thing that I can think of is that I miss spell the import command, is the "_" a real underscore? (shift thingy between 0 and =)
Title: Re: Loading Mod
Post by: Windgate on December 19, 2009, 10:06:10 AM
What do you mean? Which underscore? mod_mouse has a underscore between mod and mouse xD

Ok, maybe you have mixed different versions of dll... ¿?
Title: Re: Loading Mod
Post by: Jongf7 on December 19, 2009, 02:17:02 PM
I got it to work on my home computer!
Windows 7 gave me an other missing DLL error, the missing DLL was in the externals map, so I coppied ALL DLL files from al maps to the main map, and than it worked.
I don't think this is the correct way to make it work, but for now its good enough, time to start programming some games.

Thanks for the help Windgate :)
Title: Re: Loading Mod
Post by: Windgate on December 19, 2009, 04:09:36 PM
Some mod_xxx dll files has dependencies with other dll that must be on the same folder too, you can check it on function_list.txt
Title: Re: Loading Mod
Post by: Jongf7 on December 21, 2009, 02:19:05 PM
I finally worked that out :)
Never thought of it because the files where in different folders when I downloaded Bennu so I saw no reason to change that.
Title: Re: Loading Mod
Post by: Windgate on December 21, 2009, 07:40:26 PM
The best thing you can do is mix all dlls on the folder and go on... Bennu dlls are fuzzy cataloged xD