Create an array and insert values cumulatively - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Create an array and insert values cumulatively (
/showthread.php?tid=428610)
Create an array and insert values cumulatively -
Jochemd - 06.04.2013
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...
};
Re: Create an array and insert values cumulatively -
iJumbo - 06.04.2013
I think not, as far as I know
EDIT
ok now i know this is possible thanks
Re: Create an array and insert values cumulatively -
Jochemd - 06.04.2013
pawn Код:
new DaysCumulatively[365] = {0, 86400, ...};
This worked.
Re: Create an array and insert values cumulatively -
MP2 - 06.04.2013
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.