zCMD something is wrong
#1

Hi when i try to make this cmd
pawn Код:
if(strcmp(cmdtext,"/buyhouse",true) == 0)
    {

        new price,
        id = GetPlayerHouseEntrance(playerid);
        if (id == INVALID_HOUSE_ID) return ERROR("House: You must stand in house entrance!");
        price = Houses[id][house_price];
        if (GET_MONEY(playerid) >= price && GiveHouseToPlayer(playerid, id))
        {
            ADD_MONEY(playerid, -price);
            new msg[128];
            format(MSG, "House: You bought house for %s", FormatMoney(price));
            MESSAGE(msg);
        }
        else ERROR("House: You cannot buy this house Reason (Owned Or No Cash)!");
        return 1;
    }
to this code:
pawn Код:
CMD:buyhouse(playerid, params[])
{
  new price,
        id = GetPlayerHouseEntrance(playerid);
        if (id == INVALID_HOUSE_ID) return ERROR("House: You must stand in house entrance!");
        price = Houses[id][house_price];
        if (GET_MONEY(playerid) >= price && GiveHouseToPlayer(playerid, id))
        {
            ADD_MONEY(playerid, -price);
            new msg[128];
            format(MSG, "House: You bought house for %s", FormatMoney(price));
            MESSAGE(msg);
        }
        else ERROR("House: You cannot buy this house Reason (Owned Or No Cash)!");
        return 1;
}
i get those 4 errors

Код:
C:\Users\Kajinth Thaas\Desktop\samp03e\gamemodes\cgcnr.pwn(19972) : error 029: invalid expression, assumed zero
C:\Users\Kajinth Thaas\Desktop\samp03e\gamemodes\cgcnr.pwn(19972) : error 017: undefined symbol "cmd_buyhouse"
C:\Users\Kajinth Thaas\Desktop\samp03e\gamemodes\cgcnr.pwn(19972) : error 029: invalid expression, assumed zero
C:\Users\Kajinth Thaas\Desktop\samp03e\gamemodes\cgcnr.pwn(19972) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

do you put cmd:buyhouse OnPlayerCommandText?
if you put remove it!
Reply
#3

no i just put it in the end of my script
Reply
#4

do you make sure you have zcmd?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)