Valuenames in Valuenames like PHP (rValue$i)? - 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: Valuenames in Valuenames like PHP (rValue$i)? (
/showthread.php?tid=321331)
Valuenames in Valuenames like PHP (rValue$i)? -
C0dy09 - 26.02.2012
Hi all,
i knew, my title is a bit serious but here my problem:
f.e.:
Код:
while(i< sizeof(FrakInfo))
{
format(string,sizeof(string),"Value: %d:\t[%s$}",i,FrakInfo[i][rValue1]);
i++;
}
So now my question: Is there are posebility to do things like php so that you can loop with the while function all values of the enum "FrakInfo[id][rValue1-12]"
In php there are things like:
$test = rValue$i
or so, is there in samp also a possebility?
Sry for my bad englisch

,
MfG. Cody09
Re: Variables in Variablesnames -
wups - 26.02.2012
Quote:
Originally Posted by C0dy09
Hi all,
i knew, my title is a bit serious but here my problem:
f.e.:
Код:
while(i< sizeof(FrakInfo))
{
format(string,sizeof(string),"Value: %d:\t[%s$}",i,FrakInfo[i][rValue1]);
i++;
}
So now my question: Is there are posebility to do things like php so that you can loop with the while function all values of the enum "FrakInfo[id][rValue1-12]"
In php there are things like:
$test = rValue$i
or so, is there in samp also a possebility?
Sry for my bad englisch  ,
MfG. Cody09
|
No, It's very sad, but you can't.
You can still create variable like this:
pawn Код:
enum ehm
{
rValue[12]
}
new FrakInfo[i][ehm];
And then use it like this:
pawn Код:
for(new l=1; l< 13; l++) FrakInfo[i][rValue][l]=0;
Cheers.
AW: Valuenames in Valuenames like PHP (rValue$i)? -
C0dy09 - 26.02.2012
Hm ok, but thank you, Iґll use yourґs