Importing Imagesin Different Dirs... (Era of War)
Author |
Message |
BioHazardousWaste
|
Posted: Fri Feb 13, 2004 12:30 pm Post subject: 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 code: |
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
code: | 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:
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! |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Dan

|
Posted: Fri Feb 13, 2004 3:48 pm Post subject: (No subject) |
|
|
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 |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
 |
recneps

|
Posted: Fri Feb 13, 2004 4:00 pm Post subject: (No subject) |
|
|
i read in the Turing Reference somewhere, that you must use double \\ because a \<command> 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
|
Posted: Fri Feb 13, 2004 4:29 pm Post subject: (No subject) |
|
|
Thanx guys, I figured it was somethin simple like that. |
|
|
|
|
 |
|
|