Qbasicnews.com

Full Version: *grrrowl* :)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Well, then don't DIM them as SHARED. Why sharing them if you are gonna pass them as parameters?

Or try ("""try""") this:

Code:
DEFINT A-Z

'$DYNAMIC

DIM SHARED Sprite(0, 0)
DIM SHARED EditSprite(0, 0)

REDIM Sprite(2000, 5)
REDIM EditSprite(2000, 5)

This could be a memory problem as well. 2001x6x2x2 = 48024 bytes. Maybe you are running outta mem.
Well, I tried that, and it didn't do anything.

I also reduced the arrays to (10,1) and it STILL gave me that error. BTW, this seems to be happening whenever the program asks for anything having to do with an array...

Haminahaminahaminahaminahaminahaminahaminahaminahamina.
Quote:kinda reminds me of my prog i'm working on. works fine in ide, but when i compile it won't work. during the compiling process, it says there's over 900 bugs :o
I know this isn't answering the main question in the thread, but hellwifit Smile

Split your program into modules. You have likely exceeded the code size for one segment.
Lol! Rockuman, you are having exactly the same problems that Clarita and me are having with her new engine... We are having to do lotsa turnarounds.

Yeah, code size, and too much data allocated. Trust me, screw that shared stuff and pass the arrays as a parameters everywhere
hmmmmmmmm..........

What is the maximum size of your sprites? 40x50?

Why is your x and y the first two pixels?

Code:
DIM SHARED editSprite(1999, 4)
DIM SHARED sprite(1999, 4)
DIM SHARED imageParameters(1, 4)

SUB putSprite (x, y, image(), index)
DIM dy AS INTEGER, dx AS INTEGER
FOR dy = 0 TO imageParameters(0, index)
FOR dx = 0 TO imageParameters(1, index)
IF getPixelimage(x, y, image(), index) <> 13 THEN '13 = mask color
putPixel x + dx, y + dy, getPixelImage(dx, dy, image(), index)
END IF
NEXT dx, dy
END SUB
I have no idea what you're asking with "Why are the first pixels x and y"... If you're asking about the first two numbers in the array, they're reserved fro height and width.

It's made for 60x60, but I reduced the DIM size. And the size I'm using at the moment is 35x35, so there shouldn't be a problem.

I'll try adding DIM in the sub as soon as I get home.
point is that you mite be using them as pixels as well...
Pages: 1 2 3