Yo guys. When trying to compile the script i am getting a few errors. THis is the section of code providing problems.And here is compiler errorsКод://------------------- /bank if(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/gbank", true) == 0) { if(strcmp(cmd, "/gbank", true) == 0) { return 1; } if(IsPlayerInCheckpoint(playerid) == 0 || getCheckpointType(playerid) != CP_BANK) { SendClientMessage(playerid, COLOR_YELLOW, "You must be at a bank area to use this. ATMs are located in convenience stores."); return 1; } if(gang && playerGang[playerid]==0) { SendClientMessage(playerid, COLOR_RED, "You are not in a gang!"); return 1; } new tmp[256]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /(g)bank [amount]"); return 1; } moneys = strval(tmp); if(moneys < 1) { SendClientMessage(playerid, COLOR_YELLOW, "Hey what are you trying to pull here."); return 1; } if(GetPlayerMoney(playerid) < moneys) { moneys = GetPlayerMoney(playerid); } GivePlayerMoney(playerid, 0-moneys); if(gang) gangBank[playerGang[playerid]]+=moneys; else bank[playerid]+=moneys; if(gang) format(string, sizeof(string), "You have deposited $%d, your gang's balance is $%d.", moneys, gangBank[playerGang[playerid]]); else format(string, sizeof(string), "You have deposited $%d, your current balance is $%d.", moneys, bank[playerid]); SendClientMessage(playerid, COLOR_YELLOW, string); return 1; }
Please help asapКод:C:\Users\Gary\Documents\My Received Files\lvdmod.pwn(632) : error 029: invalid expression, assumed zero C:\Users\Gary\Documents\My Received Files\lvdmod.pwn(632) : warning 215: expression has no effect C:\Users\Gary\Documents\My Received Files\lvdmod.pwn(632) : error 001: expected token: ";", but found ")" C:\Users\Gary\Documents\My Received Files\lvdmod.pwn(632) : error 029: invalid expression, assumed zero C:\Users\Gary\Documents\My Received Files\lvdmod.pwn(632) : fatal error 107: too many error messages on one line
if(gang && playerGang[playerid]==0) {
Originally Posted by xxjackoxx
Код:
if(gang && playerGang[playerid]==0); |