[HELP] Compile Error
#1

Код:
Yo guys.
When trying to compile the script i am getting a few errors. THis is the section of code providing problems.
Код:
	//------------------- /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;
	}
And here is compiler errors
Код:
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
Please help asap
Reply
#2

wich line is th enumber 632? im lazy to read all the code
Reply
#3

Код:
if(gang && playerGang[playerid]==0) {
Reply
#4

Quote:
Originally Posted by xxjackoxx
Код:
if(gang && playerGang[playerid]==0);
use that instead that will fix it add this ; btw the bracket must be in the other line so idk why u posted it
Reply
#5

C:\Users\Gary\Documents\My Received Files\lvdmod.pwn(622) : error 001: expected token: "-identifier-", but found ";"
C:\Users\Gary\Documents\My Received Files\lvdmod.pwn(623) : warning 217: loose indentation
C:\Users\Gary\Documents\My Received Files\lvdmod.pwn(624) : error 029: invalid expression, assumed zero
C:\Users\Gary\Documents\My Received Files\lvdmod.pwn(624) : warning 215: expression has no effect
C:\Users\Gary\Documents\My Received Files\lvdmod.pwn(627) : warning 217: loose indentation
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

....Why me
Reply
#6

the "gang"

should it be "gang[playerid]>0"

or any thing that what

"sorry if its not lol i do see the new game [blah]"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)