Race checkpoints didn't work help!
#5

This is the error
The players checkpoints are not increasing on entering checkpoints

Quote:

new PlayerTotalCps[MAX_PLAYERS] = 0;
new PlayerTotalCheckpoints;

//================================================== ============================
public OnPlayerEnterRaceCheckpoint(playerid){
new string[128];
PlayerTotalCheckpoints(playerid, PlayerTotalCps, sizeof(PlayerTotalCps));
if(PlayerTotalCps[playerid] == 1) {
format(string, sizeof(string), "Check points ~w~%d~r~/~w~9", PlayerTotalCps);
TextDrawSetString(cpstats, PlayerTotalCps);
}
if(PlayerTotalCps[playerid] == 2) {
format(string, sizeof(string), "Check points ~w~%d~r~/~w~9", PlayerTotalCps);
TextDrawSetString(cpstats, PlayerTotalCps);
return 1;
}
if(PlayerTotalCps[playerid] == 3) {
format(string, sizeof(string), "Check points ~w~%d~r~/~w~9", PlayerTotalCps);
TextDrawSetString(cpstats, PlayerTotalCps);
return 1;
}
if(PlayerTotalCps[playerid] == 4) {
format(string, sizeof(string), "Check points ~w~%d~r~/~w~9", PlayerTotalCps);
TextDrawSetString(cpstats, PlayerTotalCps);
return 1;
}
if(PlayerTotalCps[playerid] == 5) {
format(string, sizeof(string), "Check points ~w~%d~r~/~w~9", PlayerTotalCps);
GameTextForAll(string, 6000,3);
TextDrawSetString(cpstats, PlayerTotalCps);
return 1;
}
if(PlayerTotalCps[playerid] == 6) {
format(string, sizeof(string), "Check points ~w~%d~r~/~w~9", PlayerTotalCps);
TextDrawSetString(cpstats, PlayerTotalCps);
return 1;
}
if(PlayerTotalCps[playerid] == 7) {
format(string, sizeof(string), "Check points ~w~%d~r~/~w~9", PlayerTotalCps);
TextDrawSetString(cpstats, PlayerTotalCps);
return 1;
}
if(PlayerTotalCps[playerid] == {
format(string, sizeof(string), "Check points ~w~%d~r~/~w~9", PlayerTotalCps);
TextDrawSetString(cpstats, PlayerTotalCps);
return 1;
}
if(PlayerTotalCps[playerid] == 9) {
format(string, sizeof(string), "Check points ~w~%d~r~/~w~9", PlayerTotalCps);
TextDrawSetString(cpstats, PlayerTotalCps);
return 1;
}
if(PlayerTotalCps[playerid] == 10) {
format(string, sizeof(string), "Race Finshed", PlayerTotalCps);
TextDrawSetString(cpstats, PlayerTotalCps);
return 1;
}
return 1;
}

Quote:

C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace.pwn(730) : error 012: invalid function call, not a valid address
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace.pwn(730) : warning 215: expression has no effect
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace.pwn(730) : warning 215: expression has no effect
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace.pwn(730) : warning 215: expression has no effect
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace.pwn(730) : error 001: expected token: ";", but found ")"
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace.pwn(730) : error 029: invalid expression, assumed zero
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace.pwn(730) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)