Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
odd error
#1
anyone remember that problem with making an indexing subroutine for put images? Well, I was doing some more work on it in trying to find the problem, and the problem seems to be right here:

makeindex tiles(), tilesindex()

right there is where I get the "memory could not be read error". Here is code that i believe should be sufficient... I didn't include the "makeindex" sub b/c the error doesn't occur in the sub, but when it tries to access the sub.

Code:
declare sub makeindex (imagearray(), indexarray())

redim shared tiles(1) as short
redim shared tilesindex(1) as short


loadtiles "tiles/set.put", tiles()
makeindex tiles(), tilesindex()

here are some concerns i have about these...

1. could redim sharing do this? I don't think short has anything to do with this.
2. could redimming them with only 1 do this?
3. should i just dim then normally?

anyways, anyone who helps or tries to help, i thank you. Smile [/code]
Jumping Jahoolipers!
Reply
#2
Another check missed, fixed.. different parameter and argument types, your arrays are shorts (16-bit), but the arguments have no explicit type, so the default one (integer, 32-bit) is assumed.
Reply
#3
I was wondering if this was it. I was going to try giving the variables in the dimension name the short symbol, except i didn't know if short had one. Now i can work around that. i'll just use "as short" then in my subs. thanks alot vic. Big Grin

**Edit**

fixed. thanks again!
Jumping Jahoolipers!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)