Autor Tema: Loading Mod  (Leído 9299 veces)

Jongf7

  • Newbie
  • *
  • Mensajes: 19
  • Karma: 1
Loading Mod
« en: Diciembre 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:

Código: [Seleccionar]
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

  • Hero Member
  • *****
  • Mensajes: 5680
  • Karma: 127
    • GECA soft
Re: Loading Mod
« Respuesta #1 en: Diciembre 17, 2009, 03:03:59 pm »
I put all files in the same directory and i don't have any problems.

Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
    • TRINIT Asociación de Informáticos de Zaragoza
Re: Loading Mod
« Respuesta #2 en: Diciembre 17, 2009, 08:43:53 pm »
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

  • Newbie
  • *
  • Mensajes: 19
  • Karma: 1
Re: Loading Mod
« Respuesta #3 en: Diciembre 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.

Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
    • TRINIT Asociación de Informáticos de Zaragoza
Re: Loading Mod
« Respuesta #4 en: Diciembre 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.
« última modificación: Diciembre 18, 2009, 01:09:37 pm por Windgate »
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

  • Newbie
  • *
  • Mensajes: 19
  • Karma: 1
Re: Loading Mod
« Respuesta #5 en: Diciembre 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.

Código: [Seleccionar]
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

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
    • TRINIT Asociación de Informáticos de Zaragoza
Re: Loading Mod
« Respuesta #6 en: Diciembre 18, 2009, 02:45:51 pm »
Dude, if you add:

Código: [Seleccionar]
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

  • Newbie
  • *
  • Mensajes: 19
  • Karma: 1
Re: Loading Mod
« Respuesta #7 en: Diciembre 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 ;).

Citar
I 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

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
    • TRINIT Asociación de Informáticos de Zaragoza
Re: Loading Mod
« Respuesta #8 en: Diciembre 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... ¿?
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

  • Newbie
  • *
  • Mensajes: 19
  • Karma: 1
Re: Loading Mod
« Respuesta #9 en: Diciembre 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 :)

Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
    • TRINIT Asociación de Informáticos de Zaragoza
Re: Loading Mod
« Respuesta #10 en: Diciembre 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
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

  • Newbie
  • *
  • Mensajes: 19
  • Karma: 1
Re: Loading Mod
« Respuesta #11 en: Diciembre 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.

Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
    • TRINIT Asociación de Informáticos de Zaragoza
Re: Loading Mod
« Respuesta #12 en: Diciembre 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
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