Loading Mod

Started by Jongf7, December 17, 2009, 02:23:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jongf7

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.

FreeYourMind

I put all files in the same directory and i don't have any problems.

Windgate

You can check how I do that on my tutorial:

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.
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Jongf7

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.

Windgate

#4
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.
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Jongf7

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.

Windgate

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
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Jongf7

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 =)

Windgate

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... ¿?
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Jongf7

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 :)

Windgate

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
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Jongf7

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.

Windgate

The best thing you can do is mix all dlls on the folder and go on... Bennu dlls are fuzzy cataloged xD
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es