I have a multi-dimensional array, and I want to get the size of each line.
If vRoute = 0, it works fine, but if it equals 1, the function crashes and it doesn't continue running the rest of the function. Something is wrong with MaxStops[vRoute] if vRoute equals anything other than 0.
What am I doing wrong?
Code:
new BusRoutes[][] = {
? ? {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
? ? {0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10}
};
Code:
new const MaxStops[] = sizeof(BusRoutes[]);
Code:
format(sStops, sizeof(sStops), "Stops: 0/%d", MaxStops[vRoute]);
If vRoute = 0, it works fine, but if it equals 1, the function crashes and it doesn't continue running the rest of the function. Something is wrong with MaxStops[vRoute] if vRoute equals anything other than 0.
What am I doing wrong?