forward StopCrashCall();
forward CrashCar();
new carcrashed[MAX_PLAYERS];
new crashtimer[MAX_PLAYERS];
new helpcar;
public CrashCar()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
new vehicle[MAX_PLAYERS];
vehicle[i] = GetPlayerVehicleID(i);
new Float:health;
GetVehicleHealth(vehicle[i], health);
if (health <= 750)
{
if (carcrashed[i] == 0)
{
TogglePlayerControllable(i, 0);
GameTextForPlayer(i, "~w~Your car is~n~~p~Broken", 3500, 1);
SendClientMessage(i, COLOR_YELLOW, "Your car is broken down, you aren't available to drive anymore. You became unconscious");
SendClientMessage(i, COLOR_YELLOW, "A message has been sent to all Mechanics and SAES Members available.");
SendRadioMessage(4, TEAM_ORANGE_COLOR, "** The car of someone broke down, use /helpcar to help this person in need ! **");
SendRadioMessage(4, TEAM_ORANGE_COLOR, "** Help him ! **");
SendJobMessage(7, TEAM_ORANGE_COLOR, "** The car of someone broke down, use /helpcar to help this person in need ! **");
SendJobMessage(7, TEAM_ORANGE_COLOR, "** Help him ! **");
SetTimerEx("StopCrashCall", 180000, 0, "i", i);
crashtimer[i] = 1;
carcrashed[i] = 1;
helpcar = i;
}
}
}
}
}
public StopCrashCall()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if (crashtimer[i] == 1)
{
SendClientMessage(i, COLOR_YELLOW, "You decided to get out of the car, it took to long");
SendClientMessage(i, COLOR_YELLOW, "TIP: Do not enter the vehicle again, it's still broken !");
TogglePlayerControllable(i, 1);
RemovePlayerFromVehicle(i);
carcrashed[i] = 0;
crashtimer[i] = 0;
}
}
}
if (strcmp(cmdtext, "/helpcar", true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] == 7 || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(backupask, giveplayer, sizeof(giveplayer));
new Float:X,Float:Y,Float:Z;
GetPlayerPos(helpcar, X, Y, Z);
SetPlayerCheckpoint(playerid, X, Y, Z, 5);
SetPlayerMarkerForPlayer(playerid,helpcar, 0xFF0000FF );
format(string, sizeof(string), "* %s has accepted a emergency call", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
GameTextForPlayer(playerid, "~w~You accepted the question to help in a car crash~n~~r~Goto redmarker", 5000, 1);
format(string, sizeof(string), "** %s has accepted the crash call, he's on his way, use /cancelhelpcar to cancel!", sendername);
SendRadioMessage(4, TEAM_BLUE_COLOR, string);
SendJobMessage(7, TEAM_BLUE_COLOR, string);
format(string, sizeof(string), "%s has accepted the crash call, he's on his way, stay calm!", sendername);
SendClientMessage(helpcar, TEAM_ORANGE_COLOR, string);
}
if (IsPlayerInCheckpoint(playerid))
{
DisablePlayerCheckpoint(playerid);
return 1;
}
}
}
if (strcmp(cmdtext, "/cancelhelpcar", true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] == 7 || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s cancelled the emergency call", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
format(string, sizeof(string), "** %s has cancelled the emergency call!", sendername);
SendRadioMessage(4, TEAM_BLUE_COLOR, string);
SendJobMessage(7, TEAM_BLUE_COLOR, string);
SetPlayerMarkerForPlayer(playerid, helpcar, 0xFFFFFF00 );
DisablePlayerCheckpoint(playerid);
return 1;
}
}
}

C:\PLRP\gamemodes\PLRP.pwn(39788) : error 017: undefined symbol "playerid" C:\PLRP\gamemodes\PLRP.pwn(39796) : error 030: compound statement not closed at the end of file (started at line 39768) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
C:\PLRP\gamemodes\PLRP.pwn(39805) : error 030: compound statement not closed at the end of file (started at line 39777) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
|
Originally Posted by Niicky_Andrews
I can't do anything without getting the line which gives the errors, please paste it here.
|
erp1b.pwn(34618) : error 029: invalid expression, assumed zero erp1b.pwn(34618) : error 004: function "CrashCar" is not implemented erp1b.pwn(34649) : error 029: invalid expression, assumed zero erp1b.pwn(34649) : error 004: function "StopCrashCall" is not implemented erp1b.pwn(34672) : error 017: undefined symbol "backupask"
|
Originally Posted by Mixman
Hi, how to fix this?
Code:
erp1b.pwn(34618) : error 029: invalid expression, assumed zero erp1b.pwn(34618) : error 004: function "CrashCar" is not implemented erp1b.pwn(34649) : error 029: invalid expression, assumed zero erp1b.pwn(34649) : error 004: function "StopCrashCall" is not implemented erp1b.pwn(34672) : error 017: undefined symbol "backupask" |