Creating increment or consecutive variable

Game Editor comments and discussion.

Creating increment or consecutive variable

Postby Clokio » Sun Jun 12, 2011 3:14 am

Anyone know how to create increment or consecutive variable

ex: a1 a2 a3...
Clokio
 
Posts: 229
Joined: Tue May 17, 2011 2:18 pm
Score: 32 Give a positive score

Re: Creating increment or consecutive variable

Postby skydereign » Sun Jun 12, 2011 6:34 am

Use an array. That way they are incremented.
Code: Select all
int array[10]; // creates 10 variables

array[0]=1;
array[1]=4;
array[2]=7;
array[3]=9;
// etc
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest