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 / image memblock out of range

Author
Message
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 18th Sep 2010 16:43 Edited at: 18th Sep 2010 16:44
iam messing around with image memblocks but theres something strange happening.

if i do:



then everything goes fine, but if i do:




then i getting a error: runtime error 5105 - memblock position outside range at line 46

so whats wrong with the for loop??

*happy coding on his 3D Construx Editor*
Dia
19
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 18th Sep 2010 17:04
which one is line 46?

are your images (and hence memblocks) the same size?

what I could suggest however is that when you go from laag = 1 to laag = 2 you have not reset your 'a' variable, so the first time you try to check the 2nd image memblock you will be looking for a byte that is outside the memblock bounds.

if you reset 'a=0' just under the for 'laag=1 to 2' it should eliminate that problem

This is not the Sig you are looking for....
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 18th Sep 2010 17:20
@ Dia, thank you, the 'a = 0' solved the problem.

*happy coding on his 3D Construx Editor*
Dia
19
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 19th Sep 2010 04:44
nws buddy

This is not the Sig you are looking for....

Login to post a reply

Server time is: 2024-11-23 07:25:14
Your offset time is: 2024-11-23 07:25:14