Hi,
I have a problem on windows
I have on disc C: a folder named pics in which there are six jpg images
named 01.jpg, 02.jpg , 03.jpg , 04.jpg ,05.jpg, 06.jpg
and this is my code
SetErrorMode(2)
SetWindowSize( 1280, 800, 1 )
Setvirtualresolution(1280,800)
SetScissor(0,0,0,0)
global dim img1$[10]
img1$[0] = " "
img1$[1] = " "
img1$[2] = " "
img1$[3] = " "
img1$[4] = " "
img1$[5] = " "
img1$[6] = " "
img1$[7] = " "
img1$[8] = " "
img1$[9] = " "
img1$[10] = " "
f=OpenRawFolder("C:\pics\")
x1 = GetRawFolderNumFiles(f)
for w=0 to x1 - 1
t= w+1
img1$[t]= "C:\pics\" + GetRawFolderFileName( f, w )
next
CloseRawFolder(f)
do
print(str(x1))
print(img1$[1])
print (img1$[2])
print (img1$[3])
print (img1$[4])
print (img1$[5])
print (img1$[6])
sync()
loop
so the result of the print is correct and print on screen
6
C:\pics\01.jpg
C:\pics\02.jpg
C:\pics\03.jpg
C:\pics\04.jpg
C:\pics\05.jpg
C:\pics\06.jpg
but if i want visualize 01.jpg (that is on variable img$[1] ) and
insert this line of code (after the instruction CloseRawFolder(f) )
bk0= CreateSprite(LoadImage (img1$[1]) )
and comment all the print in do loop
AGK make an error message :
Error: Could not find image: C:\pics\01.jpg in main.agc at line 61
where is the error ?
thak you