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 / Another Dark Basic Beginner's book Exercise

Author
Message
VGHero11
13
Years of Service
User Offline
Joined: 15th Nov 2011
Location:
Posted: 28th Feb 2012 19:47
Hello again Fellow Game Designers!

I have just finished another exercise from the "Beginner's Guide to Dark Basic" entitled, "ShootingGallary Program" however I'm getting an error message when I go to run it. It will compile but when I run it, I get error message #501 Image Number illegal at line 21. If someone could explain this error and tell me how to fix it, that would be great.



When we all lend our power together, there is nothing we
can't do!
Please Lend me your STRENGTH!
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 29th Feb 2012 00:58 Edited at: 29th Feb 2012 01:02
You load the image with an ID of 25. But set the sprite to use image ID of 1, witch doesn’t exist.

ERROR; 0501=Image number illegal
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 29th Feb 2012 05:50
Quote: "You load the image with an ID of 25. But set the sprite to use image ID of 1, witch doesn’t exist."

That is correct but he also loads a bitmap in his function with the reference number of one. That should probably be load image instead.

WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 29th Feb 2012 06:32 Edited at: 29th Feb 2012 06:37
Yes, but he's using GET IMAGE to slice the bitmap up using image# 5-15.

Edit: Actually instead of slicing the image he’s making duplicates.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 29th Feb 2012 09:01
Quote: "Yes, but he's using GET IMAGE to slice the bitmap up using image# 5-15.
"

Excellent point my good man. I ran through that too quickly!

Don't listen to me right now VGHero, I'm having an off day, WickedX is right.

VGHero11
13
Years of Service
User Offline
Joined: 15th Nov 2011
Location:
Posted: 29th Feb 2012 18:17
Thanks WickedX. I understand now what I did wrong. Since the crosshair image was set as image 25, I needed to reference that number as the image number in my SPRITE command. Like you said, I had referenced 1, not 25.

When we all lend our power together, there is nothing we
can't do!
Please Lend me your STRENGTH!

Login to post a reply

Server time is: 2024-11-23 22:35:20
Your offset time is: 2024-11-23 22:35:20