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 / Get image problems

Author
Message
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 26th Apr 2009 10:29
I am trying to use the following code to create a sprite of some text which will show over the top of the other sprites:



This works fine in one insidents but when I load the other page which uses it, I am told that runtime error 504 has occured due to an illegal area in the get image line.

This is the code which must be breaking it:


This is the code where it works successfully:



Any suggestions on which part of this might be the illegal area?

Thanks for your help,

Lucas
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 27th Apr 2009 04:02
In your function, TextOverSprite, you need to check the length of the text width versus the screen width before you grab the image. If the length of your text goes beyond the screen edge, it will error.

To me, the better way to address it would be to make the bitmap the size of the text width + 1 and text height + 1, put the text in it and then grab the image.

Hope this helps,

LB
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 27th Apr 2009 23:11
Thank you,

Problem solved

Login to post a reply

Server time is: 2024-11-25 07:32:35
Your offset time is: 2024-11-25 07:32:35