i deleted my old code thats why i request for help here if you can write new code...
|
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; } |
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. |
public OnPlayerEnterRaceCheckpoint(playerid)
{
new string[128];
PlayerTotalCps[playerid]++;
if(PlayerTotalCps[playerid] < 10)
{
format(string, sizeof(string), "Check points ~w~%d~r~/~w~9", PlayerTotalCps);
TextDrawSetString(cpstats, PlayerTotalCps);
}
else
{
TextDrawSetString(cpstats, "Race Finished");
}
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid){
new string[128];
PlayerTotalCps[playerid]++;
switch(Stats[playerid]){
case 1:{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 10.0);
SetPlayerRaceCheckpoint(playerid, 0,2144.6772, -1851.0477, 3.269,1945.6807, -1842.3702, 3.2681,10);
Stats[playerid] = 2;
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace - Copy.pwn(716) : error 028: invalid subscript (not an array or too many subscripts): "PlayerTotalCps"
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace - Copy.pwn(716) : warning 215: expression has no effect
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace - Copy.pwn(716) : error 001: expected token: ";", but found "]"
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace - Copy.pwn(716) : error 029: invalid expression, assumed zero
C:\Users\MalikObstinate\Desktop\SanAndreas MissiOns DoNe\gamemodes\1VortexRace - Copy.pwn(716) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.