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
I compiled my sprite editor. And at first it was giving me String Space Corrupt errors whenever I tried to load a file (not good). So I added Dynamic before it all, and now, when I try to load a file, the sprite editor just closes out. WTF!

Anonymous

are you ABSOLUTELY sure your writing ALL data to the exact right place in memory? If so, i have no idea... i just know when i get that its USUALLY that. Wink
Uh, I don't really know how to write memory to any other places...

Anonymous

well i mean say ur loading a sprite to Sprite(1000).

if you do
Code:
defseg = varseg(spirte())
bload "sprite.spr", varptr(sprte(0))

or any number of simple typos like that, it can wreak major havoc... even renderins your prog unsaveabl Sad

next tip: SAVE OFTEN Smile
Nope. If there was a typo like that, it wouldn't run in the IDE well either.

This problem only occurs when it's COMPILED though.
ALRIGHT, the problem is that when I add the '$DYNAMIC bit, I get a subscript out of range error in the IDE, so when it's compiled, it just shuts off.

When '$DYNAMIC is gone however, it works fine, but won't compile.

Any ideas?
We need scope. Post the exact SUB where this happens, post also the declaration of the array.
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
Here's where it happens.
Code:
SUB PutSprite (X, Y, Image(), Index)

FOR A = 0 TO Image(1, Index) 'ERROR OCCURS HERE
        FOR B = 0 TO Image(0, Index) - 1
                IF GetPixelImage(B, A, Image(), Index) <> 13 THEN
                        PutPixel X + B, Y + A, GetPixelImage(B, A, Image(), Index)
                END IF
        NEXT
NEXT


END SUB

And here are the only two arrays that are interacted with by that sub.

Code:
DIM SHARED EditSprite(2000, 5)
DIM SHARED Sprite(2000, 5)

Anonymous

It might help to have sample input data, and also to know what the 'index' sub itself does, too...
Pages: 1 2 3