Adding to List / Array
#1

I never learned or found a good / efficient way to do this. How would I make it so when I have a variable "var", how can I keep adding numbers to it in a list.

Код:
var=0
var=0,1
var=0,5,1
Then when I want to get the numbers, I can easily split it. Thanks.
Reply
#2

Код:
new array[5] = {0,1,2,3,4};
This?
Reply
#3

But i want to be able to add numbers to it at any time.
Reply
#4

pawn Код:
new array[5];
for(new x; x < sizeof(array); x++) if(!array[x]) array[x] = 2;
Reply
#5

Thanks a bunch!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)