13.04.2013, 12:52
When I try to compile it showen me that errors:
The errors are exist in those lines:
pawn Код:
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53915) : error 033: array must be indexed (variable "SellVehicleOffer")
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53936) : error 035: argument type mismatch (argument 1)
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53937) : error 035: argument type mismatch (argument 1)
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53942) : error 033: array must be indexed (variable "SellVehiclePrice")
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53943) : error 035: argument type mismatch (argument 2)
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53956) : error 017: undefined symbol "carmodel"
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53960) : error 017: undefined symbol "carmodel"
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53964) : error 017: undefined symbol "carmodel"
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53968) : error 017: undefined symbol "carmodel"
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53972) : error 017: undefined symbol "carmodel"
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53974) : error 035: argument type mismatch (argument 1)
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53975) : error 035: argument type mismatch (argument 1)
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53980) : error 033: array must be indexed (variable "SellVehiclePrice")
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(53981) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
14 Errors.
The errors are exist in those lines:
pawn Код:
else if(strcmp(x_job,"vehicle",true) == 0)
{
if(SellVehicleOfferTime[playerid] > 0)
{
if(PlayerInfo[playerid][pCash] > SellVehiclePrice[playerid])
{
if(SellVehicleSlot[playerid] == 1)
{
GetPlayerName(SellVehicleOffer[playerid], giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You have accepted the car-offer, congratulations with your new car!.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* You have succeeded in selling your previous car, congratulations!");
SendClientMessage(DivorceOffer[playerid], COLOR_LIGHTBLUE, string);
new carmodel = PlayerInfo[SellVehicleOffer][PlayerVehicleModel1];
if(PlayerInfo[playerid][PlayerVehicleModel1] != 0)
{
PlayerInfo[playerid][PlayerVehicleModel1] = carmodel;
}
if(PlayerInfo[playerid][PlayerVehicleModel2] != 0)
{
PlayerInfo[playerid][PlayerVehicleModel2] = carmodel;
}
if(PlayerInfo[playerid][PlayerVehicleModel3] != 0)
{
PlayerInfo[playerid][PlayerVehicleModel3] = carmodel;
}
if(PlayerInfo[playerid][PlayerVehicleModel4] != 0)
{
PlayerInfo[playerid][PlayerVehicleModel4] = carmodel;
}
if(PlayerInfo[playerid][PlayerVehicleModel5] != 0)
{
PlayerInfo[playerid][PlayerVehicleModel5] = carmodel;
}
ResetPlayerVehicle(SellVehicleOffer, 1);
OnPlayerSave(SellVehicleOffer);
SellVehicleOffer[playerid] = 0;
SellVehicleOfferTime[playerid] = 0;
SellVehiclePrice[playerid] = 0;
SellVehicleSlot[playerid] = 0;
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-SellVehiclePrice;
GivePlayerMoney(playerid,-SellVehiclePrice);
return 1;
}
else if(SellVehicleSlot[playerid] == 2)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You have accepted the car-offer, congratulations with your new car!.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* You have succeeded in selling your previous car, congratulations!");
SendClientMessage(DivorceOffer[playerid], COLOR_LIGHTBLUE, string);
// new carmodel = GetPlayerVehicleID(SellVehicleOffer, 2);
if(PlayerInfo[playerid][PlayerVehicleModel1] != 0)
{
PlayerInfo[playerid][PlayerVehicleModel1] = carmodel;
}
if(PlayerInfo[playerid][PlayerVehicleModel2] != 0)
{
PlayerInfo[playerid][PlayerVehicleModel2] = carmodel;
}
if(PlayerInfo[playerid][PlayerVehicleModel3] != 0)
{
PlayerInfo[playerid][PlayerVehicleModel3] = carmodel;
}
if(PlayerInfo[playerid][PlayerVehicleModel4] != 0)
{
PlayerInfo[playerid][PlayerVehicleModel4] = carmodel;
}
if(PlayerInfo[playerid][PlayerVehicleModel5] != 0)
{
PlayerInfo[playerid][PlayerVehicleModel5] = carmodel;
}
ResetPlayerVehicle(SellVehicleOffer, 2);
OnPlayerSave(SellVehicleOffer);
SellVehicleOffer[playerid] = 0;
SellVehicleOfferTime[playerid] = 0;
SellVehiclePrice[playerid] = 0;
SellVehicleSlot[playerid] = 0;
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-SellVehiclePrice;
GivePlayerMoney(playerid,-SellVehiclePrice);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " The player that offered you is currently offline!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " No one has offered to sell his car to you!");
return 1;
}
}