Create an array and insert values cumulatively
#1

Is it somehow possible to make the compiler count cumulatively? Example:

pawn Код:
new DaysCumulatively[365] =
{
    86400, ... // 86400 is one day, and from then it should count +86400 each time. So the second should be 172800, the third one 259200, etc...
};
Reply
#2

I think not, as far as I know

EDIT

ok now i know this is possible thanks
Reply
#3

pawn Код:
new DaysCumulatively[365] = {0, 86400, ...};
This worked.
Reply
#4

Not sure exactly what you mean but.

pawn Код:
new array[128] = {2, 4, ...};
Should make the values 2, 4, 6, 8.. etc.

EDIT: Hah, you beat me by 3 seconds.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)