String Array Declaration
Displaying 1-10 of 10 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Buckermann

Greetings,
If I put a string array declaration (for example "string C_Lines[500];") inside a function the script won't compile (using the 04/21 build). Outside, as a global, it compiles fine.
I'm wondering if this is this intentional or just a glitch?

And a second question:
Are multidimension arrays planed for the future?

Posted on 2004-05-04 16:33:21

RageCage

yeah arrays must be globally declaired, I dunno if there's plans to do what you said or not. as for 2d arrays, I think they're already implemented... the isometric engine looked like it used them.

Posted on 2004-05-04 16:36:15

Buckermann

That was a fast response Rage :)
Thanks for the answer.

Regarding multi dimensional arrays:
It CAN be emulated with the current arrays, when I need a Array[100,100] I just use a Array [10000] (100*100). But it would save me some thinking (I admit it, I'm lazy) if multis are added some time later.

Posted on 2004-05-04 16:50:20

vecna

What Rage said, multidimensionals are already in, and arrays must be declared globally.

Posted on 2004-05-04 19:42:07

RageCage

as long as we're on the topic of arrays... there's no problem with declairing an array wihin a struct right?

Posted on 2004-05-05 12:34:29

Overkill

No problem with arrays in structs. Though too bad they don't allow structs within structs.

Posted on 2004-05-05 13:20:32

Zip

And when are we going to get proper classes? :D

Zip

Posted on 2004-05-05 15:08:40

Buckermann

Quote:Originally posted by vecna

What Rage said, multidimensionals are already in, and arrays must be declared globally.

That is strange. When I try to compile this (as a global):

int Arraytest[10, 10];

I get this error message:
Exiting: credits/credits.vc(9): Expecting "]", but got "," instead

Posted on 2004-05-05 15:20:37

RageCage

try
int arraytest[10][10];

Posted on 2004-05-05 16:18:20

Buckermann

Quote:Originally posted by RageCage

try
int arraytest[10][10];


Argh. I feel stupid now....
Thank you for making me feel stupid!

Posted on 2004-05-05 21:12:15


Displaying 1-10 of 10 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.