Array index help.
#1

Well i have just started working with arrays.
But none of the tutorials helped me to understand something.

How can i store an object model id to an array?
Reply
#2

To define an array you need to type in the following thing:
Код:
new array[128];
This is like making a normal variable but this variable stores some things in it.
Indexes in arrays start with 0. So if you want to assign a value to a place in the array, for example for place 0:
Код:
array[0] = somevalue;
array[1] = anothervalue; //etc.
If you still don't understand give me more details about what you don't understand.
Reply
#3

Quote:
Originally Posted by YoYo123
Посмотреть сообщение
To define an array you need to type in the following thing:
Код:
new array[128];
This is like making a normal variable but this variable stores some things in it.
Indexes in arrays start with 0. So if you want to assign a value to a place in the array, for example for place 0:
Код:
array[0] = somevalue;
array[1] = anothervalue; //etc.
If you still don't understand give me more details about what you don't understand.
I have understand this..I want to store the model of some objects to an array.How can this be possible?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)