28.03.2015, 21:14
Hello, samp forum members need some help with y_command caller on dialog...
ERROR:
CODE:
ERROR:
pawn Код:
(2356) : error 017: undefined symbol "ycmd_vbuy"
(2360) : error 017: undefined symbol "PriceArray"
(2360) : error 036: empty statement
(2360) : error 017: undefined symbol "i"
(2360) : fatal error 107: too many error messages on one line
CODE:
pawn Код:
case dialog_DealershipConfirm:
{
if(!response)
{
SetPlayerPos(playerid, pDlOldPos[playerid][0], pDlOldPos[playerid][1], pDlOldPos[playerid][2]);
DestroyVehicle(pBuyingCar[playerid]);
pBuyingCar[playerid] = 0, pBuyingCarModel[playerid] = 0;
TogglePlayerControllable(playerid, true);
SendClientMessage(playerid, -1, "{8EB2D6}[INFO]{FFFFFF}: Vehicle purchasement cancelled, taking you back to the vehicle dealership menu..");
return ycmd_vbuy(playerid,pramas[],help); // FIRST error!
}
if(response)
{
for (new i; i != sizeof (PriceArray); ++ i) // ALLL THE REST ERRORS!!!
{
if (PriceArray[i][0] == pBuyingCarModel[playerid])
{
if(GetPlayerMoney(playerid) >= PriceArray[i][1])
{
GivePlayerMoney(playerid, -PriceArray[i][1]);
AddPlayerVehicle(playerid, pBuyingCarModel[playerid], PriceArray[0][i]);
}
else if(GetPlayerMoney(playerid) < PriceArray[i][1])
{
SendClientMessage(playerid, -1, "{8EB2D6}[INFO]{FFFFFF}: You don't have enough money!");
SetPlayerPos(playerid, pDlOldPos[playerid][0], pDlOldPos[playerid][1], pDlOldPos[playerid][2]);
DestroyVehicle(pBuyingCar[playerid]);
pBuyingCar[playerid] = 0, pBuyingCarModel[playerid] = 0;
TogglePlayerControllable(playerid, true);
return ycmd_vbuy(playerid,pramas[],help);
}
break;
}
}
PlayerInfo[playerid][CarOwner] = pBuyingCar[playerid];
PutPlayerInVehicle(playerid, pBuyingCar[playerid], 0);
SendClientMessage(playerid, -1, "{8EB2D6}[INFO]{FFFFFF}: You have successfully bought your vehicle! Make sure to repark it!");
TogglePlayerControllable(playerid, true);
}
return 1;
}