"Include" not working :'(

Blitz3D Forums/Blitz3D Programming/"Include" not working :'(

matthews_30(Posted 2006) [#1]
ok i have the hud, the player, the enemies in a 'Type' model (very good! thanks for the answers), enemy AI, the life and mana controllers.

now, i have a map created with an editor (mixmapper) the program it self brings a code to test the maps individually to see if they are working.

when i "Include" the map_module.bb in the main program (and add a call to the main function that loads the map) it loads the map but it did not find the images for the map and it says image not found.

i am affraid the problem is maybe due to "Scope", can somebody tell some ideas on what to check?

matt.


(tu) sinu(Posted 2006) [#2]
make sure the image file contains the full path from the main project directory, not from the include files.


boomboom(Posted 2006) [#3]
have you got the images in the right directory?

You might have put the media in a folder and linking the media in the include, based on the includes location.

You don't need todo this, link your media based on the location of the main code file.

For example:

If your main code file is in c:/game/

your include in c:/game/level1/

and your media in c:/game/level1/media

Then you will still have to load them like loadimage("level1/media/walltexture1.jpg")


matthews_30(Posted 2006) [#4]
now i fixed the problem, i forgot about the include and adapted the code into the main program. anyway, it is now working.