Variables and savable multidimensional arrays

Ideas for Game Editor evolution.

Variables and savable multidimensional arrays

Postby BeyondtheTech » Fri Aug 26, 2005 12:57 am

I noticed that in the User Variables section that there's a spot to allow a variable to be an array as well as make it part of a group used for the loadVars/saveVars function.

The problem is that I have a 2-dimensional array and the field only allows you to enter one dimension.

Is there a "manual" way to initialize a variable (and array for that matter) and make it part of a group without having to use the User Variables dialog box?

Also, I am redoing a lot of code and found out the hard way that I had to drudge through the User Variables dialog box for every variable I had to make Game Editor recognize. Imagine having to do that 50 times, ugh. Any chance of the compiler automatically detecting non-recognized variables/commands and asking you to add it for you? Or how about an import of a variable list. Both or either would save a lot of time.
User avatar
BeyondtheTech
 
Posts: 270
Joined: Wed Mar 30, 2005 6:34 am
Location: Edison, NJ
Score: 4 Give a positive score

Postby makslane » Fri Aug 26, 2005 1:18 am

You can use "fake" multidimensional arrays.

Your multidimensional array declaration:
int array[10][5];

Array use:
array[i][j] = .....;

Other solution:
int array[10*5];

And use:
array[i + 10*j] = ...;
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby BeyondtheTech » Fri Aug 26, 2005 2:08 am

Somehow, I knew you were going to say that. :wink:

What about automatically adding Variables detected in the script? That would be very cool.
User avatar
BeyondtheTech
 
Posts: 270
Joined: Wed Mar 30, 2005 6:34 am
Location: Edison, NJ
Score: 4 Give a positive score

Postby makslane » Fri Aug 26, 2005 12:58 pm

BeyondtheTech wrote:What about automatically adding Variables detected in the script?


I don't know. Can be dangerous.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby BeyondtheTech » Fri Aug 26, 2005 1:06 pm

Well, not like it would automatically, but just as you check syntax and list out all the lines of code that have issues, you can list out all the undetected keywords and ask to add them in.
User avatar
BeyondtheTech
 
Posts: 270
Joined: Wed Mar 30, 2005 6:34 am
Location: Edison, NJ
Score: 4 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest