Global new - 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: Global new (
/showthread.php?tid=575506)
Global new -
CodeStyle175 - 27.05.2015
I have global news.
new param_1[]={0,1,2};
new param_2[]={3,14,5};
now i want to get the array
but how can i get the array just only by changing the last number?
Re: Global new -
CodeStyle175 - 27.05.2015
anyone?
Re: Global new -
Konstantinos - 27.05.2015
https://sampwiki.blast.hk/wiki/Scripting_Basics#Arrays
https://sampforum.blast.hk/showthread.php?tid=318212
If you want to access the array's elements, you have to specify a valid index for it. For example, the size of both above is 3 so that means 0-2 are valid indexes:
param_1[0] is 0
param_1[1] is 1
param_1[2] is 2
and
param_2[0] is 3
param_2[1] is 14
param_2[2] is 5
Re: Global new -
CodeStyle175 - 27.05.2015
No what i mean is that, i want to change param_(this number here)[]={0,1,3};
"param_%d",id);
but i dont know how?
Sorry my bad.
problem solved