Hello folks, I've been using a tool called TNT Basic for a pretty long time now, and upon switching to Windows I've recently started using DBP. TNT was a lot simpler than this, so I've hit a few roadblocks.
My main issue is that when I try to make an array use real numbers, my program runs when I compile and run but it crashes as soon as I exit and tells me "(project name) has stopped working." Here's a snippet of the code in question:
initialization:
dim eX(Enum)#
dim eY(Enum)#
And in use:
if distance=50
estat(curE)=1
eX(curE)#=rnd(480.0)
eY(curE)#=-50.0
cure=cure+1
if cure>enum then cure=1
endif
Initializing the arrays with the # causes no problems, but as soon as I try to use them anywhere else in the program the crashes start.
I'm sorry if I'm overlooking something stupid, I tried researching the problem but didn't find anything. I had thought that maybe the syntax should be "dim eX#(Enum)" but doing that only causes the program to not run, without even highlighting the line.
Also while I'm here, is there any way I can check if a sprite is colliding with a box from a given set of coordinates? I'm practicing with a simple shmup and I like to set it up so the player's ship has a small hitbox in the center rather than bullets being able to hit the entire sprite.