zCMD something is wrong - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: zCMD something is wrong (
/showthread.php?tid=351483)
zCMD something is wrong -
CrazyChoco - 16.06.2012
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.
Re: zCMD something is wrong -
JaKe Elite - 16.06.2012
do you put cmd:buyhouse OnPlayerCommandText?
if you put remove it!
Re: zCMD something is wrong -
CrazyChoco - 16.06.2012
no i just put it in the end of my script
Re: zCMD something is wrong -
JaKe Elite - 16.06.2012
do you make sure you have zcmd?