16.06.2012, 10:54
Hi when i try to make this cmd
to this code:
i get those 4 errors
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;
}
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;
}
Код:
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.