forums

TNT Basic Forums > Programming Q&A
"Array not dimensioned" error
< Last Thread     Next Thread >
Author
Thread        Post A Reply

08-26-2002 05:04

Posted by:
Holmes Futrell

Click Here to Email Holmes Futrell   Find more posts by Holmes Futrell

I'm programming a scrolling game and I'm getting this error and I can't figure out why:

*** Runtime exception caught ***
Line# : 118
Code : if cloudvalid[n]=false
Error : Array not dimensioned.

Has anyone ever gotten this error and fixed it? What are some things I could check about this? I'm really stuck here people!

08-26-2002 14:06

Posted by:
Mr Me

Find more posts by Mr Me

When you global cloudvalid, do you put it like this Global <whatever> cloudvalid[<the highest number you will use with the array+1>]?

08-26-2002 20:15

Posted by:
Matthew

Find more posts by Matthew

Array not dimensioned could mean that when it was declared, the variable inside it did exist.

Example:

int object[map object count]
...
print object[n]


if no map is loaded then I'm pretty sure it will generate this error. ( I think it will also do it if you have no object in your map )

So look around the place where you declared this array and make sure the value is something!

hope this helps!

08-27-2002 04:04

Posted by:
Holmes

Click Here to Email Holmes   Find more posts by Holmes

All Fixed!

Thanks guys, I did something stupid.

The error confused the heck out of me because the line of code where I used it was after it was declared. Little did I realise the line of code was in a procedure, and while that procedure was physically after the declaration, the call of the procedure was before it. Well, my problems are all over with now and my game is going insanely great! I absolutely love this program. I no longer have to mourn the death of hypercard. I'll be posting a link to download my game in this forum in a week or two when my game is done.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.