Simple question with id assignments
#1

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?
Reply
#2

I think 0
edit: Im sure its 0
Reply
#3

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.
Reply
#4

Thanks so much, i just could not remember where it started pooling the numbers.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)