Command Errors
#1

Getting Errors

Errors

Код:
C:\Users\Debbie\Documents\EXRP\gamemodes\EXRPu16.pwn(34640) : warning 202: number of arguments does not match definition
C:\Users\Debbie\Documents\EXRP\gamemodes\EXRPu16.pwn(34640) : error 001: expected token: ")", but found ";"
C:\Users\Debbie\Documents\EXRP\gamemodes\EXRPu16.pwn(34640) : error 036: empty statement
pawn Код:
CMD:buyproducts(playerid, params[])
{
    new string2[128];
    if(PlayerInfo[playerid][pBizKey] != INVALID_BIZZ_ID && (IsPlayerInRangeOfPoint(playerid, 2.0, BizInfo[PlayerInfo[playerid][pBizKey]][IXCoord], BizInfo[PlayerInfo[playerid][pBizKey]][IYCoord], BizInfo[PlayerInfo[playerid][pBizKey]][IZCoord])))
    {
        if(sscanf(params, "i", params[0])) return SendClientMessageEx(playerid, COLOR_GRAD3, "USAGE: /buyproducts [amount]");
            if(GetPlayerMoney(playerid, params[0]*500);//This Line Errors
        GivePlayerCash(playerid, params[0]*500);
        BizInfo[PlayerInfo[playerid][pBizKey]][Products] = params[0];
        SaveBizInfo(PlayerInfo[playerid][pBizKey]);
        format(string2,sizeof(string2),"You have bought %d amount of business products", params);
        SendClientMessageEx(playerid, COLOR_GRAD3, string2);
        return 1;
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD2, "You don't own a business, or are not inside one of them.");
        return 1;
    }
}
Reply
#2

pawn Код:
CMD:buyproducts(playerid, params[])
{
    new string2[128];
    if(PlayerInfo[playerid][pBizKey] != INVALID_BIZZ_ID && (IsPlayerInRangeOfPoint(playerid, 2.0, BizInfo[PlayerInfo[playerid][pBizKey]][IXCoord], BizInfo[PlayerInfo[playerid][pBizKey]][IYCoord], BizInfo[PlayerInfo[playerid][pBizKey]][IZCoord])))
    {
        if(sscanf(params, "i", params[0])) return SendClientMessageEx(playerid, COLOR_GRAD3, "USAGE: /buyproducts [amount]");
        GetPlayerMoney( playerid );
        GivePlayerCash(playerid, params[0]*500);
        BizInfo[PlayerInfo[playerid][pBizKey]][Products] = params[0];
        SaveBizInfo(PlayerInfo[playerid][pBizKey]);
        format(string2,sizeof(string2),"You have bought %d amount of business products", params);
        SendClientMessageEx(playerid, COLOR_GRAD3, string2);
        return 1;
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD2, "You don't own a business, or are not inside one of them.");
        return 1;
    }
}
Witch notice

pawn Код:
CMD:buyproducts(playerid, params[])
{
    new string2[128];
    if(PlayerInfo[playerid][pBizKey] != INVALID_BIZZ_ID && (IsPlayerInRangeOfPoint(playerid, 2.0, BizInfo[PlayerInfo[playerid][pBizKey]][IXCoord], BizInfo[PlayerInfo[playerid][pBizKey]][IYCoord], BizInfo[PlayerInfo[playerid][pBizKey]][IZCoord])))
    {
        if(sscanf(params, "i", params[0])) return SendClientMessageEx(playerid, COLOR_GRAD3, "USAGE: /buyproducts [amount]");
        if( GetPlayerMoney( playerid ) <= params[0]*500 )
            return SendClientMessage( playerid, 0xff0000ff, "You do not have enough money");
        GivePlayerCash(playerid, params[0]*500);
        BizInfo[PlayerInfo[playerid][pBizKey]][Products] = params[0];
        SaveBizInfo(PlayerInfo[playerid][pBizKey]);
        format(string2,sizeof(string2),"You have bought %d amount of business products", params);
        SendClientMessageEx(playerid, COLOR_GRAD3, string2);
        return 1;
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD2, "You don't own a business, or are not inside one of them.");
        return 1;
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)