05.10.2010, 18:01
im trying to make a dialog but whats wrong with that responds?
Erros
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 4512 && response == 1)
{
if(IsBuyableCar[vehicleid])
{
if (strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],PlayerName(playerid))) return SendClientMessage(playerid,COLOR_RED,"[ » ] You already own this vehicle !");
if (strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],"Unbought"))
{
if(VehicleSystem[IsBuyableCar[vehicleid]][Price] > GetPlayerMoney(playerid)) return SendClientMessage(playerid,COLOR_RED,"[ » ] Not enought Dollars !");
MaxVehicles[playerid]=0;
for(new i=0;i<MAX_VEHICLES;i++)
{
if(strmatch(VehicleSystem[i][Owner],PlayerName(playerid)))
{
MaxVehicles[playerid]=MaxVehicles[playerid]+1;
}
}
if(MaxVehicles[playerid]>=MAX_VEHICLES_PER_PLAYER) return SendClientMessage(playerid,COLOR_RED,"[ » ] You already own the limit of vehicles !");
strmid(VehicleSystem[IsBuyableCar[vehicleid]][Owner],PlayerName(playerid),0,20,20);
VehicleSystem[IsBuyableCar[vehicleid]][Locked]=0;
GivePlayerMoney(playerid,-VehicleSystem[IsBuyableCar[vehicleid]][Price]);
SendClientMessage(playerid,COLOR_GREEN,"[ » ] You have bought this vehicle !");
format(string,sizeof(string), "[ » ] You lost %d $ !",VehicleSystem[IsBuyableCar[vehicleid]][Price]);
SendClientMessage(playerid, COLOR_YELLOW, string);
SaveMYSQLCarID(vehicleid);
}
else
{
SendClientMessage(playerid,COLOR_RED,"[ » ] This vehicle is not for sale !");
}
}
}
else
{
RemovePlayerFromVehicle(playerid);
return 1;
}
return 1;
}
pawn Код:
(396) : error 029: invalid expression, assumed zero
(396) : error 004: function "OnDialogResponse" is not implemented
(398) : error 017: undefined symbol "dialogid"