little help
#1

Код:
C:\Users\TRAFEH\Desktop\SA-MP\filterscripts\eAdmin.pwn(2236) : error 027: invalid character constant
C:\Users\TRAFEH\Desktop\SA-MP\filterscripts\eAdmin.pwn(2236) : error 027: invalid character constant
C:\Users\TRAFEH\Desktop\SA-MP\filterscripts\eAdmin.pwn(2238) : error 027: invalid character constant
C:\Users\TRAFEH\Desktop\SA-MP\filterscripts\eAdmin.pwn(2238) : error 027: invalid character constant
C:\Users\TRAFEH\Desktop\SA-MP\filterscripts\eAdmin.pwn(8669) : warning 217: loose indentation
Код:
	if(strcmp(cmd, "/uncage", true) == 0)
	{
		if(AccInfo[playerid][Level] < 4)
		return ErrorMessages(playerid, 5);

		new Index;
		new tmp[256];  tmp  = strtok(params, Index);
		new player1 = ReturnUser(tmp);
	  	new tmp2[256]; tmp2 = strtok(params, Index);

	 	if(!strlen(tmp)) return
	 	SendClientMessage(playerid, LIGHTBLUE, "[ USAGE: /uncage (player<name/id>)]") ;


		if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && (AccInfo[player1][Level] != ServerInfo[MaxAdminLevel]))
		{

	    if(AccInfo[player1][pCaged] == 0)
		return SendClientMessage(playerid, red, "[ ERROR: Player is not in Cage. ]");

		new string[128];
		new playername[MAX_PLAYER_NAME];
		new adminname [MAX_PLAYER_NAME];
		SendCommandToAdmins(playerid,"unCage");
	 	GetPlayerName(player1, playername, sizeof(playername));
		GetPlayerName(playerid, adminname, sizeof(adminname));
		format(string, sizeof(string), "[ Administrator %s(%d) have unCaged \"%s(%d)\]",adminname,playerid, playername,player1);
		SendClientMessageToAll(red, string);
		format(string, sizeof(string), "[ ADMIN: You have unCaged \"%s(%d)\]",playername,player1);
		SendClientMessageToAll(red, string);
	    AccInfo[player1][pCaged] = 0;
		PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
		PlayerPlaySound(player1,1057,0.0,0.0,0.0);
	    UnCagePlayer(playerid);
  }
		else return ErrorMessages(playerid, 3);
		return 1;
		}
What's wrong?
Reply
#2

You can inform at least the line of mistakes?
Reply
#3

rofl wtf... cant believe threads like this still even exist ..
OP downloads a filterscript old as fuck.. it uses strtok, and then posts a command. no line numbers or anything xD
just why.. also indentation is fucked, and use [pawn] tags next time
Reply
#4

Hey man, comment out the line which the errors are on, we can't tell which lines it is, because they aren't numbered. Than I can help you out
Reply
#5

Код:
if(strcmp(cmd, "/uncage", true) == 0)
{
	if(AccInfo[playerid][Level] < 4)
	return ErrorMessages(playerid, 5);

	new Index;
	new tmp[256];  tmp  = strtok(params, Index);
	new player1 = ReturnUser(tmp);
  	new tmp2[256]; tmp2 = strtok(params, Index);

 	if(!strlen(tmp)) return
 	SendClientMessage(playerid, LIGHTBLUE, "[ USAGE: /uncage (player<name/id>)]") ;

	if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && (AccInfo[player1][Level] != ServerInfo[MaxAdminLevel]))
	{
	    if(AccInfo[player1][pCaged] == 0)
		return SendClientMessage(playerid, red, "[ ERROR: Player is not in Cage. ]");

		new string[128];
		new playername[MAX_PLAYER_NAME];
		new adminname [MAX_PLAYER_NAME];
		SendCommandToAdmins(playerid,"unCage");
	 	GetPlayerName(player1, playername, sizeof(playername));
		GetPlayerName(playerid, adminname, sizeof(adminname));
		format(string, sizeof(string), "[ Administrator %s(%d) have unCaged \"%s(%d)\"]",adminname,playerid, playername,player1);
		SendClientMessageToAll(red, string);
		format(string, sizeof(string), "[ ADMIN: You have unCaged \"%s(%d)\"]",playername,player1);
		SendClientMessageToAll(red, string);
	    AccInfo[player1][pCaged] = 0;
		PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
		PlayerPlaySound(player1,1057,0.0,0.0,0.0);
	    UnCagePlayer(playerid);
	}
	else return ErrorMessages(playerid, 3);
	return 1;
}
Reply
#6

Quote:
Originally Posted by Macronix
Посмотреть сообщение
Код:
if(strcmp(cmd, "/uncage", true) == 0)
{
	if(AccInfo[playerid][Level] < 4)
	return ErrorMessages(playerid, 5);

	new Index;
	new tmp[256];  tmp  = strtok(params, Index);
	new player1 = ReturnUser(tmp);
  	new tmp2[256]; tmp2 = strtok(params, Index);

 	if(!strlen(tmp)) return
 	SendClientMessage(playerid, LIGHTBLUE, "[ USAGE: /uncage (player<name/id>)]") ;

	if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && (AccInfo[player1][Level] != ServerInfo[MaxAdminLevel]))
	{
	    if(AccInfo[player1][pCaged] == 0)
		return SendClientMessage(playerid, red, "[ ERROR: Player is not in Cage. ]");

		new string[128];
		new playername[MAX_PLAYER_NAME];
		new adminname [MAX_PLAYER_NAME];
		SendCommandToAdmins(playerid,"unCage");
	 	GetPlayerName(player1, playername, sizeof(playername));
		GetPlayerName(playerid, adminname, sizeof(adminname));
		format(string, sizeof(string), "[ Administrator %s(%d) have unCaged \"%s(%d)\"]",adminname,playerid, playername,player1);
		SendClientMessageToAll(red, string);
		format(string, sizeof(string), "[ ADMIN: You have unCaged \"%s(%d)\"]",playername,player1);
		SendClientMessageToAll(red, string);
	    AccInfo[player1][pCaged] = 0;
		PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
		PlayerPlaySound(player1,1057,0.0,0.0,0.0);
	    UnCagePlayer(playerid);
	}
	else return ErrorMessages(playerid, 3);
	return 1;
}
Thank you
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)