Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / For..Next Loop will not load images

Author
Message
sgalland
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: United States
Posted: 7th Apr 2004 11:35
For some reason when I run this code it said that the image does not exist. I know it does and when I explicitly type load image "images/background.bmp" it works dandy, and with all the other images in the images directory.

Here is the troubled code:


If you ask me this should just load the image, if I dont use the for..next loop and still load the image from an array it works fine, so I am pretty dang baffled.

Thanks!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 7th Apr 2004 13:26 Edited at: 7th Apr 2004 13:29
this example works for both dbc 113 and dbp 5.2 so it must be your paths.

http://www.lunarpixel.net/temp/img_array_test.zip

here is a duplicate copy of the code inside the zip that also has 3 mini media elements.


you may also notice i didnt use the x variable in this part of code
for the bold area as waisted coding.

for i = 1 to maximg
x = (i*64)
y = 100

load image myimg$(i),i
sprite i,i*64,y,i
next t


fall down seven times, stand up eight
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 7th Apr 2004 23:05
if this is in pro with the original editor then you could also try deleting the .dbo file and then recompiling the code, I have had problems with the .dbo file being corrupted somehow and actualy trying to load an earlier and now unused/moved filename from the same project, confused the hell out of me since it insists the (wrongly named) file does not exist when you can see it right there in the project folder.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
Egyptian Mua
21
Years of Service
User Offline
Joined: 7th Apr 2004
Location: htdocs
Posted: 9th Apr 2004 01:43
Make sure the picture dose not have 2 .bmp

-Egyptianmua

Login to post a reply

Server time is: 2025-05-23 06:43:48
Your offset time is: 2025-05-23 06:43:48