
-----------------------------------
who cares?
Wed Oct 13, 2004 5:12 pm

help with picture filename (combining words) (nevermind)
-----------------------------------
ok, i got a problem...

i have 10 pictures in a folder... each one named planet1, planet2, planet3, planet4, etc... up to 10

and i have a loop with a counter variable..

what i want to do is to be able to display each image every time the loop runs, so, first i display planet1, then planet2, then planet3, etc.

this is what i have made:


loop
counter := counter + 1
counter_s := intstr (counter)
var planetPic : int := Pic.FileNew ("planet" + counter_s + ".jpg")
Pic.Draw (planetPic, 270, 200, picCopy)
exit when counter = 10 
end loop


i get an error, cause it can't read the planet file name... can anyone help me please?

counter has alredy been initialized outside the loop for value 0 and counter_s, as you can see is a string...

thanks for the help!  :)

-----------------------------------
wtd
Wed Oct 13, 2004 5:16 pm


-----------------------------------
Since you know the range of numbers you're looping over, you'd be better off writing this as a for loop.

for counter : 1 .. 10

-----------------------------------
who cares?
Wed Oct 13, 2004 5:17 pm


-----------------------------------
Since you know the range of numbers you're looping over, you'd be better off writing this as a for loop.

for counter : 1 .. 10

yeah, sure... i could do that... thanks

but i still have the problem with the file name... and i dont know why...

cause i did it last year with another file, i concatinated (is that how you spell it?) 2 numbers with an underscore and it worked...

anyone know what's wrong?

-----------------------------------
who cares?
Wed Oct 13, 2004 5:20 pm


-----------------------------------
NEVERMIND!

i'm a moron....

i forgot to add the subfolder to the path..  :oops: 

delete this stupid thread please...  :oops:

-----------------------------------
fmy
Wed Oct 13, 2004 6:41 pm


-----------------------------------
hahahahaha, i was just about to mention that.
