GLBasic forum

Main forum => GLBasic - en => Topic started by: Kyo on 2009-Nov-24

Title: Application crash whit array
Post by: Kyo on 2009-Nov-24
Hi all,  :booze:
I use this array:

Code (glbasic) Select


TYPE livello
x%
y%
obj%
obj_1%
mx%
my%
active%
anim%
timer_anim%
explode%
explode_tmp%
rimnatric%
pos_x%
pos_y%
not_recopied%
remove%
new_x%
new_y%
x_1%
y_1%
ENDTYPE

GLOBAL livello1[] AS livello
DIM livello1[30][30]





this is the function for update sprite array:

Code (glbasic) Select

FOR x% = 0 TO 3
FOR y% = 0 TO 3
DRAWSPRITE livello1[x][y].obj,  livello1[x][y].x , livello1[x][y].y
NEXT
NEXT



when i compile the first two row work fine, but the last two row crash the application (application locked - terminated whit task manager)


|W|W|D|D|
|W|W|D|D|
|W|W|D|D|
|W|W|D|D|

W= WORK
D = DON'T WORK - TASKMANAGER TO CLOSE APPLICATION


I use sprite 62*62 png 24 bit
any suggestion ???
Title: Re: Application crash whit array
Post by: Moru on 2009-Nov-24
I'm not having any troubles with that code, are you running with debug mode on or off?
Title: Re: Application crash whit array
Post by: Kyo on 2009-Nov-24
On and off .....

if i use only 4 sprite the code work's fine

FOR x% = 0 TO 1
   FOR y% = 0 TO 1
            DRAWSPRITE livello1
Title: Re: Application crash whit array
Post by: Moru on 2009-Nov-24
Can you share the whole code including loading of sprites and everything up to the loop, and the sprites please?