Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
*grrrowl* :)
#1
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!
Reply
#2
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
Reply
#3
Uh, I don't really know how to write memory to any other places...
Reply
#4
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
Reply
#5
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.
Reply
#6
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?
Reply
#7
We need scope. Post the exact SUB where this happens, post also the declaration of the array.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#8
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
Jumping Jahoolipers!
Reply
#9
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)
Reply
#10
It might help to have sample input data, and also to know what the 'index' sub itself does, too...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)