Please Fix This Error
#1

Hey Please Fix This ErrOr
i am adding this


Код:
CMD:kick(playerid,params[]){
  if(ServerInfo[kick]==0){
    CommandDisabled(playerid);}
  if(Account[playerid][pAdminlevel]<CmdsOptions[kick]){
    if(Options[Language]==1)format(string, sizeof(string), "Devi avere livello admin %d per usare questo CMD!!!", CmdsOptions[kick]), SendClientMessage(playerid, COLOR_LIGHTRED, string);else
	if(Options[Language]==2)format(string, sizeof(string), "You must be admin level %d to use this CMD!!!", CmdsOptions[kick]), SendClientMessage(playerid, COLOR_LIGHTRED, string);}else
  if(Account[playerid][pAdminlevel]>=CmdsOptions[kick]){
	if(ServerInfo[kick]==1){
        new tmp[MAX_SERVER_STRING],tmp2[MAX_SERVER_STRING], Index; tmp = strtok(params,Index); tmp2 = strtok(params,Index);
	    if(!strlen(tmp)){
			if(Options[Language]==1)SendClientMessage(playerid, COLOR_WHITE, "UTILIZZA: /kick "#COL_RED"[id] [motivo]");else
            if(Options[Language]==2)SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick "#COL_RED"[id] [reason]");
			return 1;}
        if(!IsNumeric(tmp)){
          if(Options[Language]==1)SendClientMessage(playerid, COLOR_LIGHTRED, "ERRORE: Devi inserire un id valido! Non un nome");else
          if(Options[Language]==2)SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: You must type a valid id! Not a name");
          return 1;}
        if(!strlen(tmp2)){
			if(Options[Language]==1)SendClientMessage(playerid, COLOR_WHITE, "UTILIZZA: /kick [id] "#COL_RED"[motivo]");else
            if(Options[Language]==2)SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [id] "#COL_RED"[reason]");
			return 1;}
		player = strval(tmp);
		if(!IsPlayerConnected(player)){
          if(Options[Language]==1)SendClientMessage(playerid, COLOR_LIGHTRED, "ERRORE: Questo giocatore non и connesso.");
          if(Options[Language]==2)SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: This player is not connected.");
	      return 1;}
		if(IsPlayerConnected(player)){
		  if(player==playerid){
            if(Options[Language]==1)SendClientMessage(playerid, COLOR_RED, "<<<<Non puoi kickare te stesso!!!>>>>");else
		    if(Options[Language]==2)SendClientMessage(playerid, COLOR_RED, "<<<<You can't kick yourself!!!>>>>");
			return 1;}
          if(Options[AllowCmdsOnAdmins]==0){
			if(Account[player][pAdminlevel]>=1){
              if(Options[Language]==1)SendClientMessage(playerid, COLOR_RED, "<<<<Non puoi kickare un altro admin!!!>>>>");else
		      if(Options[Language]==2)SendClientMessage(playerid, COLOR_RED, "<<<<You can't kick an other admin!!!>>>>");
			  return 1;}
	        if(Account[player][pAdminlevel]==0){
			  GetPlayerName(player, incriminato, sizeof(incriminato)); GetPlayerName(playerid, adminname, sizeof(adminname));
              if(Options[Language]==1)format(str, sizeof(str), "[ADMIN]: %s ha kickato %s [Motivo: %s] \r\n", adminname, incriminato, params[2]), SendClientMessageToAll(COLOR_YELLOW, str);else
			  if(Options[Language]==2)format(str, sizeof(str), "[ADMIN]: %s kicked %s [Reason: %s] \r\n", adminname, incriminato, params[2]), SendClientMessageToAll(COLOR_YELLOW, str);
		      if(Options[Language]==1)GameTextForPlayer(player,"~r~CACCIATO!!!",20000,3);else
		      if(Options[Language]==2)GameTextForPlayer(player,"~r~KICKED!!!",20000,3);
		      new File:reported = fopen(KickedPlayersFile,io_append);
		      fwrite(reported, str);
		      fclose(reported);
		      printf("[ADMIN]: %s ha kickato %s [motivo: %s]",adminname, incriminato, params[2]); Kick(player);
			  return 1;}}
          if(Options[AllowCmdsOnAdmins]==1){
	 	      GetPlayerName(player, incriminato, sizeof(incriminato)); GetPlayerName(playerid, adminname, sizeof(adminname));
              if(Options[Language]==1)format(str, sizeof(str), "[ADMIN]: %s ha kickato %s [Motivo: %s] \r\n", adminname, incriminato, params[2]), SendClientMessageToAll(COLOR_YELLOW, str);else
			  if(Options[Language]==2)format(str, sizeof(str), "[ADMIN]: %s kicked %s [Reason: %s] \r\n", adminname, incriminato, params[2]), SendClientMessageToAll(COLOR_YELLOW, str);
		      if(Options[Language]==1)GameTextForPlayer(player,"~r~CACCIATO!!!",20000,3);else
		      if(Options[Language]==2)GameTextForPlayer(player,"~r~KICKED!!!",20000,3);
		      new File:reported = fopen(KickedPlayersFile,io_append);
		      fwrite(reported, str);
		      fclose(reported);
		      printf("[ADMIN]: %s ha kickato %s [motivo: %s]",adminname, incriminato, params[2]); Kick(player);}}else{
        if(Options[Language]==1)SendClientMessage(playerid,COLOR_RED,"Questo ID non appartiene a nessun player!!!");else
		if(Options[Language]==2)SendClientMessage(playerid,COLOR_RED,"Invalid Player ID!!!");}}}
  return 1;}
//----------------------------------------------------------------------------//
CMD:ban(playerid,params[]){
  if(ServerInfo[ban]==0){
    CommandDisabled(playerid);}
  if(Account[playerid][pAdminlevel]<CmdsOptions[ban]){
    if(Options[Language]==1)format(string, sizeof(string), "Devi avere livello admin %d per usare questo CMD!!!", CmdsOptions[ban]), SendClientMessage(playerid, COLOR_LIGHTRED, string);else
	if(Options[Language]==2)format(string, sizeof(string), "You must be admin level %d to use this CMD!!!", CmdsOptions[ban]), SendClientMessage(playerid, COLOR_LIGHTRED, string);}else
  if(Account[playerid][pAdminlevel]>=CmdsOptions[ban]){
	if(ServerInfo[ban]==1){
        new tmp[MAX_SERVER_STRING],tmp2[MAX_SERVER_STRING], Index; tmp = strtok(params,Index); tmp2 = strtok(params,Index);
	    if(!strlen(tmp)){
			if(Options[Language]==1)SendClientMessage(playerid, COLOR_WHITE, "UTILIZZA: /ban "#COL_RED"[id] [motivo]");else
            if(Options[Language]==2)SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ban "#COL_RED"[id] [reason]");
			return 1;}
        if(!IsNumeric(tmp)){
          if(Options[Language]==1)SendClientMessage(playerid, COLOR_LIGHTRED, "ERRORE: Devi inserire un id valido! Non un nome");else
          if(Options[Language]==2)SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: You must type a valid id! Not a name");
          return 1;}
        if(!strlen(tmp2)){
			if(Options[Language]==1)SendClientMessage(playerid, COLOR_WHITE, "UTILIZZA: /ban [id] "#COL_RED"[motivo]");else
            if(Options[Language]==2)SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ban [id] "#COL_RED"[reason]");
			return 1;}
		player = strval(tmp);
		if(!IsPlayerConnected(player)){
          if(Options[Language]==1)SendClientMessage(playerid, COLOR_LIGHTRED, "ERRORE: Questo giocatore non и connesso.");
          if(Options[Language]==2)SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: This player is not connected.");
	      return 1;}
		if(IsPlayerConnected(player)){
		  if(player==playerid){
            if(Options[Language]==1)SendClientMessage(playerid, COLOR_RED, "<<<<Non puoi bannare te stesso!!!>>>>");else
		    if(Options[Language]==2)SendClientMessage(playerid, COLOR_RED, "<<<<You can't ban yourself!!!>>>>");
			return 1;}
          if(Options[AllowCmdsOnAdmins]==0){
			if(Account[player][pAdminlevel]>=1){
              if(Options[Language]==1)SendClientMessage(playerid, COLOR_RED, "<<<<Non puoi bannare un altro admin!!!>>>>");else
		      if(Options[Language]==2)SendClientMessage(playerid, COLOR_RED, "<<<<You can't ban an other admin!!!>>>>");
			  return 1;}
	        if(Account[player][pAdminlevel]==0){
              Banned[playerid]=true;
			  GetPlayerName(player, incriminato, sizeof(incriminato)); GetPlayerName(playerid, adminname, sizeof(adminname));
              if(Options[Language]==1)format(str, sizeof(str), "[ADMIN]: %s ha bannato %s [Motivo: %s] \r\n", adminname, incriminato, params[2]), SendClientMessageToAll(COLOR_YELLOW, str);else
			  if(Options[Language]==2)format(str, sizeof(str), "[ADMIN]: %s banned %s [Reason: %s] \r\n", adminname, incriminato, params[2]), SendClientMessageToAll(COLOR_YELLOW, str);
		      if(Options[Language]==1)GameTextForPlayer(player,"~r~BANNATO!!!",20000,3);else
		      if(Options[Language]==2)GameTextForPlayer(player,"~r~BANNED!!!",20000,3);
		      new File:reported = fopen(BannedPlayersFile,io_append);
		      fwrite(reported, str);
		      fclose(reported);
		      printf("[ADMIN]: %s ha bannato %s [motivo: %s]",adminname, incriminato, params[2]); Ban(player);
			  return 1;}}
          if(Options[AllowCmdsOnAdmins]==1){
              Banned[playerid]=true;
	 	      GetPlayerName(player, incriminato, sizeof(incriminato)); GetPlayerName(playerid, adminname, sizeof(adminname));
              if(Options[Language]==1)format(str, sizeof(str), "[ADMIN]: %s ha bannato %s [Motivo: %s] \r\n", adminname, incriminato, params[2]), SendClientMessageToAll(COLOR_YELLOW, str);else
			  if(Options[Language]==2)format(str, sizeof(str), "[ADMIN]: %s banned %s [Reason: %s] \r\n", adminname, incriminato, params[2]), SendClientMessageToAll(COLOR_YELLOW, str);
		      if(Options[Language]==1)GameTextForPlayer(player,"~r~BANNATO!!!",20000,3);else
		      if(Options[Language]==2)GameTextForPlayer(player,"~r~BANNED!!!",20000,3);
		      new File:reported = fopen(BannedPlayersFile,io_append);
		      fwrite(reported, str);
		      fclose(reported);
		      printf("[ADMIN]: %s ha bannato %s [motivo: %s]",adminname, incriminato, params[2]); Ban(player);}}else{
        if(Options[Language]==1)SendClientMessage(playerid,COLOR_RED,"Questo ID non appartiene a nessun player!!!");else
		if(Options[Language]==2)SendClientMessage(playerid,COLOR_RED,"Invalid Player ID!!!");}}}
  return 1;}
and i got This

C:\Users\Arish\Desktop\SATDM~RP v130\Gamemodes\SATDM_v13.pwn(50764) : error 017: undefined symbol "kick"
C:\Users\Arish\Desktop\SATDM~RP v130\Gamemodes\SATDM_v13.pwn(50765) : error 017: undefined symbol "CommandDisabled"
C:\Users\Arish\Desktop\SATDM~RP v130\Gamemodes\SATDM_v13.pwn(50766) : error 017: undefined symbol "Account"
C:\Users\Arish\Desktop\SATDM~RP v130\Gamemodes\SATDM_v13.pwn(50766) : warning 215: expression has no effect
C:\Users\Arish\Desktop\SATDM~RP v130\Gamemodes\SATDM_v13.pwn(50766) : error 001: expected token: ";", but found "]"
C:\Users\Arish\Desktop\SATDM~RP v130\Gamemodes\SATDM_v13.pwn(50766) : error 029: invalid expression, assumed zero
C:\Users\Arish\Desktop\SATDM~RP v130\Gamemodes\SATDM_v13.pwn(50766) : fatal error 107: too many error messages on one line

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


6 Errors.

Please Help Me To Fix It
Reply
#2

I can't understand, why people paste a code on their Gamemode or FS and they expect to work/compile.
First of all, are you using ZCMD? Yiou don't have the disable for commands. Or get it from there you get the commands or delete all this.
pawn Код:
if(ServerInfo[kick]==0){
    CommandDisabled(playerid);}
Reply
#3

Yea i am UsinG ZCMD ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)