08.12.2010, 08:46
Hi ! I made /charity command that when you do it some money will be withdrawn from your character , and donated . But i get these erorrs :
Command :
Errors :
Lines: 11523 :
11531 :
Help please !
Command :
pawn Код:
if(strcmp(cmd, "/charity", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /charity [amount]");
return 1;
}
giveplayerid = strval(tmp)
if(giveplayerid <= playermoney && giveplayerid >= 0);
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Thank you for you donation of, $%d.",sendername,giveplayerid);
SendClientMessage(playerid, COLOR_GREEN, string);
GivePlayerMoney(playerid, -giveplayerid);
PayLog(string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "That is not enough.");
}
return 1;
}
pawn Код:
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(11523) : error 001: expected token: ";", but found "if"
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(11523) : error 036: empty statement
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(11531) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
pawn Код:
if(giveplayerid <= playermoney && giveplayerid >= 0);
pawn Код:
else