How to fix this error ?
#1

PHP код:
CMD:buycar(playeridparams[])
{
    new 
string[128], vslot;
       if(!
IsPlayerLoggedIn(playerid)) return SendClientMessage(playeridCOLOR_GREY"You need to login first before using any command.");
    if(!
IsPlayerInRangeOfPoint(playerid2, -135.0201,1116.2260,20.1966)) return SendClientMessage(playeridCOLOR_GREY"You are not near the vehicles dealership.");
      if(
PlayerInfo[playerid][vModel] && PlayerInfo[playerid][vVModel] && PlayerInfo[playerid][vVVModel])
    {
        
format(stringsizeof(string), "You already own vehicles ID %d and %d and %d."PlayerInfo[playerid][pVeh], PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][pVVVeh]);
        
SendClientMessage(playeridCOLOR_GREYstring);
    }
    if(
sscanf(params"i"vslot)) return SendClientMessage(playeridCOLOR_WHITE"[Usage]: /buycar [slot]");
    if(
vslot || vslot 3) return SendClientMessage(playeridCOLOR_WHITE"There are only 3 slots");
    switch(
vslot)
    {
        case 
1Wannabuycarinslot[playerid] = 1;
        case 
2Wannabuycarinslot[playerid] = 2;
        case 
3Wannabuycarinslot[playerid] = 3;
    }
    else 
SSSShowDialog(playerid10);
    return 
1;

Error line: else SSSShowDialog(playerid, 10);
Error:
error 029: invalid expression, assumed zero
Reply
#2

pawn Код:
CMD:buycar(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsPlayerInRangeOfPoint(playerid, 2, -135.0201,1116.2260,20.1966)) return SendClientMessage(playerid, COLOR_GREY, "You are not near the vehicles dealership.");
    if(PlayerInfo[playerid][vModel] && PlayerInfo[playerid][vVModel] && PlayerInfo[playerid][vVVModel])
    {
        new string[64]
        format(string, sizeof(string), "You already own vehicles ID %d and %d and %d.", PlayerInfo[playerid][pVeh], PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][pVVVeh]);
        SendClientMessage(playerid, COLOR_GREY, string);
        return 1;
    }
    new vslot;
    if(sscanf(params, "i", vslot)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /buycar [slot]");
    if(vslot < 1 || vslot > 3) return SendClientMessage(playerid, COLOR_WHITE, "There are only 3 slots");
    Wannabuycarinslot[playerid] = vslot;
    SSSShowDialog(playerid, 10);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)