Hi i'm very new to GLBasic (and basic in general) ;/
i selected in my project "explicit declaration"
CONSTANT MaxXBalls% = 7
CONSTANT MaxYBalls% = 7
DIM BallTable%[MaxXBalls%][MaxYBalls%]
in the code glBasic says " variable is not explicitly defined : BallTable%" :rant:
why ? O_O
how can explicit define the BallTable array ? "dim" is not enough?
thanks.
and sorry for my stupid question...
If I remember correctly, you need to use GLOBAL DIM
No - thats wrong... :S
Try :
GLOBAL BallTable%[]
DIM BallTable%[MaxXBalls%][MaxYBalls%]
Hi gregbug, for make an array you only have to write a line seem linke this.
Dim arrayname
- --This is an unidimensional array and x is a number in example 10
Dim arrayname - [y] --This is an biidimensional array and x is a number in example 10 and y can be too 10 or another number
I think waht the maximun dimensions on a array are four.
Rebember always!!!, when you run into Array, the maximun value, is arrayname[x-1].
Best regards.
Mentalthink
PD: I donÃ,´t be a proffesional developer, perhaps other people of this forum can helpyou most efficiently.
if you want explicits, you must tell the compiler about the vairable
GLOBAL arr[]
DIM arr[8]
thanks! now works!!!!
CONSTANT MaxXBalls% = 7
CONSTANT MaxYBalls% = 7
GLOBAL BallTable%[]
DIM BallTable%[MaxXBalls%][MaxYBalls%]
thanks to all!!!! (fantastic forum!!!)
thanks again!
:nw: