SA-MP Forums Archive
Error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error (/showthread.php?tid=477803)



Error - GrandParadise - 26.11.2013

When i try to compile this:

Код:
}
CMD:call(playerid, params[])
{
	new number, sendername[MAX_PLAYER_NAME], string[128];
	if(sscanf(params,"i", number))
	{
 		SendClientMessage(playerid, COLOR_GREEN, "____________Services number list____________");
 		SendClientMessage(playerid, COLOR_GREEN, "/call [number]");
   		SendClientMessage(playerid, COLOR_WHITE, "[Emergency]911 - Emergency Line || 103 - L.S-E.M.S");
   		SendClientMessage(playerid, COLOR_WHITE, "[Services]445 - Taxi Company || 235 - Mechanic");
   		SendClientMessage(playerid, COLOR_GREEN, "____________________________________________");
   		return 1;
   	}
   	if(number == PlayerInfo[playerid][pNumber]) return SCM(playerid, COLOR_GREY,"Can't call yourself");
   	if(Mobile[playerid] != 255) return SCM(playerid, COLOR_GREY,"Already in a call");
   	GetPlayerName(playerid,sendername,sizeof(sendername));
   	format(string, sizeof(string), "* %s takes his cellphone out.", sendername);
   	SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
   	ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
   	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pNumber] == number && number != 0)
			{
 				new giveplayerid;
				giveplayerid = i;
				Mobile[playerid] = giveplayerid;
				if(IsPlayerConnected(giveplayerid))
				{
					if(giveplayerid != INVALID_PLAYER_ID)
 					{
						if (Mobile[giveplayerid] == 255)
						{
							format(string, sizeof(string), "[Mobile] Your mobile phone is ringing (/pickup) Caller: %d", PlayerInfo[playerid][pNumber]);
							SendClientMessage(giveplayerid, COLOR_YELLOW, string);
							GetPlayerName(giveplayerid, sendername, sizeof(sendername));
							RingTone[giveplayerid] = 10;
							format(string, sizeof(string), "* %s's phone is ringing.", sendername);
							ProxDetector(30.0, i, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
							CellTime[playerid] = 1;
							return 1;
						}
					}
				}
			}
		}
	}
	return 1;
}
I'm getting this error:
Код:
C:\Users\SHIT\Desktop\LAST\gamemodes\ESLv1.0a.pwn(838) : error 054: unmatched closing brace ("}")
C:\Users\SHIT\Desktop\LAST\gamemodes\ESLv1.0a.pwn(851) : error 017: undefined symbol "PlayerInfo"
C:\Users\SHIT\Desktop\LAST\gamemodes\ESLv1.0a.pwn(851) : warning 215: expression has no effect
C:\Users\SHIT\Desktop\LAST\gamemodes\ESLv1.0a.pwn(851) : error 001: expected token: ";", but found "]"
C:\Users\SHIT\Desktop\LAST\gamemodes\ESLv1.0a.pwn(851) : error 029: invalid expression, assumed zero
C:\Users\SHIT\Desktop\LAST\gamemodes\ESLv1.0a.pwn(851) : fatal error 107: too many error messages on one line



Re: Error - Blast3r - 26.11.2013

Could you please show us which line is the line 851?


Re: Error - GrandParadise - 26.11.2013

Код:
if(number == PlayerInfo[playerid][pNumber]) return SCM(playerid, COLOR_GREY,"Can't call yourself");