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! |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Dan
![](http://wiki.compsci.ca/images/archive/3/3c/20100325043407!Danspic.gif)
|
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! |
|
|
|
![](images/spacer.gif) |
recneps
![](http://www.fcpocanada.com/canada1.gif)
|
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 ![Smile Smile](http://compsci.ca/v3/images/smiles/icon_smile.gif) |
|
|
|
|
![](images/spacer.gif) |
BioHazardousWaste
|
Posted: Fri Feb 13, 2004 4:29 pm Post subject: (No subject) |
|
|
Thanx guys, I figured it was somethin simple like that. |
|
|
|
|
![](images/spacer.gif) |
|
|