SA-MP Forums Archive
Weird errors for - command! - 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: Weird errors for - command! (/showthread.php?tid=405492)



Weird errors for - command! - FL3GM4 - 06.01.2013

Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(5275) : error 037: invalid string (possibly non-terminated string)
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(5275) : error 017: undefined symbol "ID"
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(5275) : error 029: invalid expression, assumed zero
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(5275) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
command:

Код:
CMD:unmute(playerid, params[])
{
 	new id, string[128];
	if(PlayerInfo[playerid][pAdmin] < 1)return 1;
	else if(!sscanf(params, "u", id)) return SendClientMessage(playerid,COLOR_RED,"/unmute [ID/DioImena]);
	else if(Mute[playerid] == 1)return SendClientMessage(playerid,COLOR_RED,"Igrac nije utisan");
	else if(ID == INVALID_PLAYER_ID)return SendClientMessage(playerid, COLOR_WHITE, ""#COL_RED"| "COL_LIGHTBLUE"WS:DM "#COL_RED"| "#COL_WHITE""#COL_BLACK"| "COL_RED"Odbijeno "#COL_BLACK"| "#COL_WHITE"Pogresan ID");
	{
			format(string, sizeof(string), "Admin %s je maknuo mute igracu: %s", PlayerName(playerid), PlayerName(id));
    		SendClientMessage(playerid, COLOR_YELLOW, string);
  			Mute[id] = 0;
	}
	return 1;
}
what i done wrong?


Re: Weird errors for - command! - JM_Millers - 06.01.2013

PHP код:
else if(ID == INVALID_PLAYER_ID) 
USE:

PHP код:
else if(id == INVALID_PLAYER_ID) 



Re: Weird errors for - command! - FL3GM4 - 06.01.2013

Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(5275) : error 037: invalid string (possibly non-terminated string)
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(5275) : error 017: undefined symbol "ID"
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(5275) : error 029: invalid expression, assumed zero
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(5275) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
edit:
this is error line

Код:
	else if(!sscanf(params, "u", id)) return SendClientMessage(playerid,COLOR_RED,"/unmute [ID/DioImena]);



Re: Weird errors for - command! - mastermax7777 - 06.01.2013

Quote:
Originally Posted by FL3GM4
Посмотреть сообщение
Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(5275) : error 037: invalid string (possibly non-terminated string)


4 Errors.
edit:
this is error line
Well its pretty obvious isnt it?
Код:
	else if(!sscanf(params, "u", id)) return SendClientMessage(playerid,COLOR_RED,"/unmute [ID/DioImena]");



Re: Weird errors for - command! - CrazyChoco - 06.01.2013

Maybe for you but not Jim, Else he wouldn't asked -.-"


Re: Weird errors for - command! - FL3GM4 - 06.01.2013

resolved ...


Re: Weird errors for - command! - mastermax7777 - 06.01.2013

Quote:
Originally Posted by CrazyChoco
Посмотреть сообщение
Maybe for you but not Jim, Else he wouldn't asked -.-"
he just forgot the ending closing "
..

that's all.. no need to get all worked up after this lol