
-----------------------------------
BioHazardousWaste
Fri Feb 13, 2004 12:30 pm

Importing Imagesin Different Dirs... (Era of War)
-----------------------------------
I understand the Pic command pretty well now I think, but I couldn't find how to do this last thing... how do you import a file from a different directory? e.g. To import a light tank

Import Pic 
var PicID : int
var filename : string

filename := ("LTank.jpg")

PicID :=  Pic.FileNew (filename)
Pic.Draw (PicID, 25, 150, picMerge)


I tried using the directory in the filename string, but to no avail :(  Turing gives me the error "Illegal picture ID number '0'", on the line
filename := ("m:\tank.bmp"). 
I also got that error if the picture wasn't in the same directory of my program. NOTE: I am doing this at school, and my "personal" drive is labelled M:... Would the network make this error?  

Unworking Code:


var PicID : int
var filename : string

filename := ("m:\Era Of War\Pics\LTank.jpg")

PicID :=  Pic.FileNew (filename)
Pic.Draw (PicID, 25, 150, picMerge)


And yes, i'm quite positive the picture is in that directory!

-----------------------------------
Dan
Fri Feb 13, 2004 3:48 pm


-----------------------------------
try "m:\\Era Of War\\Pics\\LTank.jpg" insted of "m:\Era Of War\Pics\LTank.jpg"

turing's way of speffing dir lines is a bit wired

-----------------------------------
recneps
Fri Feb 13, 2004 4:00 pm


-----------------------------------
i read in the Turing Reference somewhere, that you must use double \\ because a \ indicates to the program that there is a switch there, like in DOS, dir /p gives you all files in the dir by pages :)

-----------------------------------
BioHazardousWaste
Fri Feb 13, 2004 4:29 pm


-----------------------------------
Thanx guys, I figured it was somethin simple like that.
