07.08.2013, 14:06
have problems to end this command i guess that is the problem,
i get 4 errors on the command under this one i guess its not ending like it should here is the script
Please if you have time to check it i would be glad for all help
Errors
i get 4 errors on the command under this one i guess its not ending like it should here is the script
Please if you have time to check it i would be glad for all help

Код:
CMD:cancel(playerid, params[])
{
new id, string[128];
if(!PlayerIsOn(id)) return NotConnectedMSG(playerid);
if(sscanf(params, "s[128]", params))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cancel [option]");
SendClientMessage(playerid, COLOR_GREY, "OPTIONS: steels");
return 1;
}
if(!strcmp(params, "steels", true))
{
if(BeenOfferedSteels[playerid])
{
new playerb = BuySteelsFrom[playerid];
if(!PlayerNearPlayer(3.0, playerid, id)) return NotNearPlayerMSG(playerid);
format(string, sizeof(string), " You have cancelled %d's materials offer.", RPN(playerb));
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), " %s has cancelled your materials offer.", RPN(playerid));
SendClientMessage(playerb, COLOR_GREY, string);
SellSteelsTo[playerb] = -1;
BuySteelsFrom[playerid] = -1;
BuySteelsAmount[playerid] = 0;
BuySteelsPrice[playerid] = 0;
BeenOfferedSteels[playerid] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nobody has offered to sell you materials.");
return 1;
}
return 1;
}
Код:
: error 029: invalid expression, assumed zero : error 017: undefined symbol "cmd_steel" : error 029: invalid expression, assumed zero : fatal error 107: too many error messages on one line

