Simple question with id assignments - 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: Simple question with id assignments (
/showthread.php?tid=313191)
Simple question with id assignments -
Rokzlive - 24.01.2012
Ok i have this function
pawn Код:
enum MissionPointInfo
{
Name[30],
Float:X,
Float:Y,
Float:Z
}
new MissionPoint[][MissionPointInfo] =
{
{"LVA Freight", 1701.9475, 940.5465, 10.8203},
{"LV Church", 1496.2524, 772.1427, 10.8203},
{"Shody Used Autos", 1727.6351, 1812.1750, 10.8203}
};
So my question is, is the line for LVA Freight Id 0 or 1?
Like, would i use MissionPoint[0][Name] to get the name "LVA Freight" or MissionPoint[1][Name] to get it?
Re: Simple question with id assignments -
milanosie - 24.01.2012
I think 0
edit: Im sure its 0
Re: Simple question with id assignments -
[XST]O_x - 24.01.2012
Always remember that array counting begins from 0.
For example new func[50] has values from func[0] to func[49].
So for your question, the line for LVA Freight Id is 0.
Re: Simple question with id assignments -
Rokzlive - 24.01.2012
Thanks so much, i just could not remember where it started pooling the numbers.