19.04.2011, 09:56
Good Morning all 
First off, i'd like to thank everyone on this forum, including but not limited to the SAMP developers and beta testers, for the amazing effort they put in.
Right, sentimental's over;
I seem to be having a rather annoying problem of arrays not giving me the right data... (well, not me obviously, you know what i mean)
I have an array (called Route101) which SHOULD contain 15 different coordinates, heres my array, and how i set it up:
Now i know someone is going to say "Have you called BusMissionsInit" - so i'll answer it already: Yes, i have. In OnGameModeInit - with the rest of my objects/vehicles / resources.
I am using race checkpoints. Here is how i set them up:
I just cannot see where it is dying. Can anyone see what is wrong?
Thanks,
Ash

First off, i'd like to thank everyone on this forum, including but not limited to the SAMP developers and beta testers, for the amazing effort they put in.
Right, sentimental's over;
I seem to be having a rather annoying problem of arrays not giving me the right data... (well, not me obviously, you know what i mean)
I have an array (called Route101) which SHOULD contain 15 different coordinates, heres my array, and how i set it up:
pawn Код:
//Route 101 has 14 stops
enum RouteData {Float:x, Float:y, Float:z}
new Route101[13][RouteData];
stock BusMissionsInit()
{
new i;
Route101[i][x] = 169.3567; Route101[i][y] = -1739.3060; Route101[i][z] = 4.4763; i++;
Route101[i][x] = 1196.5941; Route101[i][y] = -1855.5844; Route101[i][z] = 13.4955; i++;
Route101[i][x] = 1826.2672; Route101[i][y] = -2100.1414; Route101[i][z] = 13.4835; i++;
Route101[i][x] = 1964.9810; Route101[i][y] = -1768.8596; Route101[i][z] = 13.4783; i++;
Route101[i][x] = 2357.9417; Route101[i][y] = -1752.7144; Route101[i][z] = 13.4793; i++;
Route101[i][x] = 2639.3540; Route101[i][y] = -1771.4929; Route101[i][z] = 10.8091; i++;
Route101[i][x] = 2710.5073; Route101[i][y] = -2021.2656; Route101[i][z] = 13.4003; i++;
Route101[i][x] = 2861.2561; Route101[i][y] = -1911.4941; Route101[i][z] = 11.0386; i++;
Route101[i][x] = 2514.9006; Route101[i][y] = 45.1526; Route101[i][z] = 26.4297; i++;
Route101[i][x] = 1047.5758; Route101[i][y] = -949.7613; Route101[i][z] = 42.7522; i++;
Route101[i][x] = 218.2735; Route101[i][y] = -1361.7000; Route101[i][z] = 50.7355; i++;
Route101[i][x] = 752.9525; Route101[i][y] = -1583.7092; Route101[i][z] = 13.8202; i++;
Route101[i][x] = 403.8641; Route101[i][y] = -1655.8706; Route101[i][z] = 29.5599; i++;
Route101[i][x] = -132.1000; Route101[i][y] = -1650.4924; Route101[i][z] = 3.4956;
print("Bus Route: 101 --------------");
printf("Route101: %i stops created", i+1);
print("-----------------------------");
i = 0;
}
I am using race checkpoints. Here is how i set them up:
pawn Код:
stop = pMission[playerid][busstop];
SetPlayerRaceCheckpoint(playerid, 0, Route101[stop][x], Route101[stop][y], Route101[stop][z], Route101[stop+1][x], Route101[stop+1][y], Route101[stop+1][z], C_SIZE);
Thanks,
Ash