Ultimate Amiga

Network Boards => AMOS Language Discussion => AMOS Factory => AMOS Professional Forum => Topic started by: MichaelVParent on May 26, 2008, 05:17:59 AM

Title: syntax question for a load command
Post by: MichaelVParent on May 26, 2008, 05:17:59 AM
Does anyone know what the syntax would be if I wanted to load images from the same folder that the program is in...so that I could distribute the game in a folder with the images and it would work fine for anyones system?

thanks,
Holymonkey (Mike)
Title: Re: syntax question for a load command
Post by: SamuraiCrow on May 26, 2008, 04:19:21 PM
I don't think there is a special trick.  You just don't change directories within your program and it will be in the program directory by default.
Title: Re: syntax question for a load command
Post by: MichaelVParent on May 26, 2008, 05:45:55 PM
Thanks much. :)  Seems to have worked.. I simply have:

Load IFF "example.iff",0

and it loads just fine.  At some point i'll try running everything from a different drawer to make sure, but I'm assuming it will work fine.
Title: Re: syntax question for a load command
Post by: Lonewolf10 on May 29, 2008, 09:05:18 PM

Yes, SamuraiCrow is correct.

As long as you don't change directories by using the DIR$ (or similar) commands it will work. You can store images in a sub-folder and it will still work ok.


Your program location: Dir1/Program

Misc file location: Dir1/Stats

Image location: Dir1/Images/Title.Iff



Load Iff "Images/Title.iff",0
Bload "Stats",10


It may be easier storing things in sub-drawers (directories if you prefer) if you have lots of files.


Regards,
Lonewolf10

Title: Re: syntax question for a load command
Post by: MichaelVParent on May 30, 2008, 03:39:12 AM
thats wonderfyllt simple and works great!  Thanks much.