SA-MP Forums Archive
Array starting value - 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: Array starting value (/showthread.php?tid=281100)



Array starting value - MP2 - 04.09.2011

new pickup_id[MAX_PICKUPS] = -1;

But they're all 0 apart from pickup_id[0].


Re: Array starting value - Babul - 04.09.2011

a simple loop will do it:
Код:
new pickup_id[MAX_PICKUPS];
ongamemodeinit:
Код:
for(new pid=0;pid<MAX_PICKUPS;pid++)
{
	pickup_id[pid]=-1;
}



Re: Array starting value - Babul - 04.09.2011

oh, thx ****** - for telling me that i must have missed some parts in the pawn-lang.pdf >-< you kinda force me to seek through all my arrays. learning never ends.. btw, page 64 heheh