I have a problem which probably has a very simple answer however I have been unable to find it.
Here is some simple code to illustrate the problem.
This code creates an array 80x80 with data.
This program will fail as it begins to run.
It wont get to the first mousewait.
I need help to understand how to create an array and yet still be able to run.
I have changed this up a lot of ways.. the common denominator to failure is to try and use the array.
Here is some simple code to illustrate the problem.
This code creates an array 80x80 with data.
This program will fail as it begins to run.
It wont get to the first mousewait.
I need help to understand how to create an array and yet still be able to run.
I have changed this up a lot of ways.. the common denominator to failure is to try and use the array.
Code (glbasic) Select
// --------------------------------- //
// Project: omgbug
// Start: Tuesday, October 15, 2013
// IDE Version: 10.283
// SETCURRENTDIR("Media") // go to media files
GLOBAL ArrayHeight%,ArrayWidth%,grid%,myarray[]
DIM myarray[ArrayHeight%][ArrayWidth%]
ArrayHeight% = 80
ArrayWidth% = 80
LOCAL a%,b%
FOR a%=0 TO ArrayHeight%
FOR b%=0 TO ArrayWidth%
myarray[a%][b%] = "Data"
NEXT
NEXT
PRINT "The array has data",100,100
SHOWSCREEN
MOUSEWAIT
FOR a%=0 TO ArrayHeight%
FOR b%=0 TO ArrayWidth%
myarray[a%][b%] = ""
NEXT
NEXT
PRINT "The array is empty",100,100
SHOWSCREEN
MOUSEWAIT