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.

Newcomers DBPro Corner / Need help with loading images ...

Author
Message
Elron
20
Years of Service
User Offline
Joined: 22nd Jul 2004
Location: TX
Posted: 24th Jul 2004 17:32 Edited at: 24th Jul 2004 17:33
Hello all,
I am new around here and to programing for that matter.
Attached is a bit of code i am trying to get working.
All is well till it tries to load the image at which
point i get "RUN TIME ERROR 506 - Could not load image at Line 26"
I have been through the forums and tried many things,
but as yet have had no luck. I am using DBpro.

Thanks

"if it's not broke, i have not tried"
Yart
20
Years of Service
User Offline
Joined: 23rd Jun 2004
Location: Turkey Sandwich
Posted: 24th Jul 2004 17:38
I don't see the code, but I'll see what I can do for you.

First of all, let's say you have a picture called,
Bob.jpg

Nextly you need to load your image file by entering
load image "Bob.jpg",1
(Providing the image is number 1 or not, you set number)

Now to show your image on the screen, just simply put
paste image 1,0,0

The 1 is the image number.
Just replace your 0s with your X and Y cordinates (The 0s I put would just make it on the top left side of the screen) and voila! Picturefied! Hope I helped!

Oh yeah, and if that's what you did, look at your file entension. That might be comflicting too. I usually use .JPGs

-Have Fun!

My avatar sucks!
Elron
20
Years of Service
User Offline
Joined: 22nd Jul 2004
Location: TX
Posted: 24th Jul 2004 17:41
does my post not have a "source" button on it?

and thanks for the fast reply i'm looking it over now.

"if it's not broke, i have not tried"
Yart
20
Years of Service
User Offline
Joined: 23rd Jun 2004
Location: Turkey Sandwich
Posted: 24th Jul 2004 17:43
nope, didn't see a source code button... but anyway, your welcome!

My avatar sucks!
Elron
20
Years of Service
User Offline
Joined: 22nd Jul 2004
Location: TX
Posted: 24th Jul 2004 17:45
rem Make a matrix to move on
make matrix 1,1024,1024,3,3
LOAD IMAGE "DIRTGRAY.tga", 1
LOAD IMAGE "DIRTGRAY.tga", 1, 1
PREPARE MATRIX TEXTURE 1, 1, 1, 1
SET MATRIX TEXTURE 1, 1, 1

here it is then

"if it's not broke, i have not tried"
Yart
20
Years of Service
User Offline
Joined: 23rd Jun 2004
Location: Turkey Sandwich
Posted: 24th Jul 2004 17:47 Edited at: 24th Jul 2004 17:48
...why on earth do you have two load images for the same image?
try getting rid of the second one with the two 1s

secondly, which line is 26?

My avatar sucks!
Elron
20
Years of Service
User Offline
Joined: 22nd Jul 2004
Location: TX
Posted: 24th Jul 2004 17:51
the command list it the DBpro help file has it that way?

or is it stating use one or the other ?

sorry code is not my thing i'm a level designer but i have
strong resolve (levels i want to stand alone) and time.

so i understand if you feel the urdge to flame me

"if it's not broke, i have not tried"
Yart
20
Years of Service
User Offline
Joined: 23rd Jun 2004
Location: Turkey Sandwich
Posted: 24th Jul 2004 17:54
it has it that way.
just get rid of LOAD IMAGE "DIRTGRAY.tga", 1, 1
and not LOAD IMAGE "DIRTGRAY.tga", 1
and you should be fine. And nah, I understand your current state and how much you need help. Everyone needs it sometime... even I have trouble figuring out something right now. But for now I gotta get to bed, so if that don't work, unless nobody replies by the time I wake up and get on here, you'll have to work alone... or be happy if it works.

Well nights!
- Yart (Like as if you didn't already know my name! )

My avatar sucks!
Elron
20
Years of Service
User Offline
Joined: 22nd Jul 2004
Location: TX
Posted: 24th Jul 2004 18:01
the first of the 2 load lines is 26

i just tried to recomplie with a jpg and got the same error?
under my projects dir i have a media folder with my images in it.
is that correct? C:\DBpro\Projects\Mine\Media

"if it's not broke, i have not tried"
Elron
20
Years of Service
User Offline
Joined: 22nd Jul 2004
Location: TX
Posted: 24th Jul 2004 18:02
Thanks again.
catch ya later

E

"if it's not broke, i have not tried"
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 24th Jul 2004 18:50
You also have a REPEAT there, in that both images loaded have the same number. This may or may not cause the error you're seeing, but it's worth considering.

Any truly great code should be indisguishable from magic.
Elron
20
Years of Service
User Offline
Joined: 22nd Jul 2004
Location: TX
Posted: 24th Jul 2004 19:53
OK this seems to be the winning combo (and there was much rejoicing)

---------------------------
rem Make a matrix to move on
make matrix 1,1024,1024,32,32

Rem texture matrix
Load image "DIRTGRAY.JPG",1
Prepare matrix texture 1,1,2,2
---------------------------

Problem is now only "DIRTGRAY.JPG" wants to load? Any idea?

Thanks in advance,
E

"if it's not broke, i have not tried"

Login to post a reply

Server time is: 2024-09-22 18:21:12
Your offset time is: 2024-09-22 18:21:12