Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Invalid Array Name?

Author
Message
Area 51
19
Years of Service
User Offline
Joined: 3rd Feb 2006
Location: UNKNOWN
Posted: 1st Sep 2008 17:53
Hi.
I have a problem with this code in my program.



It compiles fine, but when I run it, there's an error message "Array name is not valid".
Can anyone help?

Are we alone?
Robert The Robot
18
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 1st Sep 2008 18:19 Edited at: 1st Sep 2008 18:21
The error is in the command


Don't ask me why, but the Save Array command doesn't like you to specify multiple dimensions. You should specify it like this:

and the array will save. It may look like only one dimension is being saved (the array "map(20)") but in actual fact, it will be saving the full array ("Map(20,22)").

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Area 51
19
Years of Service
User Offline
Joined: 3rd Feb 2006
Location: UNKNOWN
Posted: 1st Sep 2008 18:33
Thanks, Robert! That makes sense now since the dimensions in the save array command are only for identification of the array.

Thanks again!

Are we alone?

Login to post a reply

Server time is: 2025-06-07 06:38:39
Your offset time is: 2025-06-07 06:38:39