Qbasicnews.com
March 21, 2019, 07:10:39 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: *grrrowl* :)  (Read 7368 times)
Neo
Na_th_an
*****
Posts: 2150



« Reply #15 on: December 15, 2003, 09:23:11 AM »

Hrmm. Ok.

Please post what the Image() array actually is and what it contains. Furthermore, please post the full code of the GetPixelImage and PutPixel routine.

This way, we might be able to find you a solution Smiley

BTW: Please choose an other topic-title next time Wink
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #16 on: December 15, 2003, 11:52:10 AM »

The error comes in array Image, which is received as a parameter inside the SUB. Now you show me two SHARED arrays, so I understand that you are calling that sub passing one of those two SHARED arrays as a parameter...

Then, why are those variables SHARED, if you are passing them as parameters? This can be the error.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Rokkuman
Na_th_an
*****
Posts: 1973



« Reply #17 on: December 15, 2003, 12:07:27 PM »

Who to the wha' to the how?

Ok, let's see if my inferior brain can comprehend that. Smiley

The reason that it's SHARED is because whenever I don't share it, the variable isn't received in the subs. I hope that helped.

Neo: I'll get that code once I get back home. And sure, I'll change the title. Smiley
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #18 on: December 15, 2003, 12:26:00 PM »

If it is shared, you don't need to pass it as a parameter.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Rokkuman
Na_th_an
*****
Posts: 1973



« Reply #19 on: December 15, 2003, 04:26:05 PM »

Nooooooooooooooooooo... Smiley

Ok, "Sprite" and "EditSprite" are dimmed as arrays

In the sub, that perimeter is used to input WHICH array you're using. In this program, Sprite and EditSprite are being used.

But the thing is, I'm tried DIMMING both sprites at unrealistic amounts, and it still keeps pimping on me...
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #20 on: December 15, 2003, 05:08:22 PM »

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.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Rokkuman
Na_th_an
*****
Posts: 1973



« Reply #21 on: December 15, 2003, 05:29:55 PM »

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.
Logged
adosorken
*/-\*
*****
Posts: 3655



WWW
« Reply #22 on: December 15, 2003, 06:23:44 PM »

Quote from: "barok"
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  Shocked

I know this isn't answering the main question in the thread, but hellwifit Smiley

Split your program into modules. You have likely exceeded the code size for one segment.
Logged

I'd knock on wood, but my desk is particle board.
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #23 on: December 15, 2003, 08:08:43 PM »

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
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #24 on: December 15, 2003, 08:35:40 PM »

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
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Rokkuman
Na_th_an
*****
Posts: 1973



« Reply #25 on: December 16, 2003, 12:47:44 PM »

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.
Logged
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #26 on: December 16, 2003, 03:20:15 PM »

point is that you mite be using them as pixels as well...
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!