05.12.2010, 13:46
I want the withdraw money command to be accesible from 2 areas so i made this :
But if i compile i get these errors :
pawn Код:
if(strcmp(cmd, "/withdraw", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /withdraw [amount]");
return 1;
}
giveplayerid = strval(tmp);
if (PlayerToPoint(8, playerid,364.1431,173.7478,1008.3828)) || PlayerToPoint(10, playerid, -25.6093,-137.7065,1003.5469)
{
if(giveplayerid <= PlayerInfo[playerid][pBank] && giveplayerid >= 0)
{
format(string, sizeof(string), "You have withdrawed %d$ money from your bank account.",giveplayerid);
SendClientMessage(playerid, COLOR_GREEN, string);
GivePlayerMoney(playerid, giveplayerid);
PlayerInfo[playerid][pBank] = PlayerInfo[playerid][pBank]-giveplayerid;
CreateBankMoneyTextDraw(playerid);
}
else
{
SendClientMessage(playerid, COLOR_RED,"You do not have that money on your bank, type /balance to view your bank money.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED,"You must be at the bank to do this command.");
}
return 1;
}
pawn Код:
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(9365) : error 029: invalid expression, assumed zero
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(9366) : error 001: expected token: ";", but found "{"
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(9380) : error 029: invalid expression, assumed zero