Error while compiling [REP+]
#1

pawn Код:
CMD:kick(playerid,params[]) {
       if(IsPlayerAdmin(playerid))
   {
      new tmp[256], tmp2[256], Index;
      tmp = strtok(params,Index), tmp2 = strtok(params,Index);
      if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "Koristi: /kick [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
      new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
      player1 = strval(tmp); // << player1 = ID of The Player
      if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,0xFF0000AA,"Igrac nije online"); //<< Check If Player Connected Or Not
      GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
      GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
         format(string,sizeof(string),"Admin %s je kikovao %s | Razlog ( %s )",adminname,playername,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
         SendClientMessageToAll(0xFF0000AA,string); // Send Message To all Players.
         Kick(player1);
   } else return SendClientMessage(playerid,0xFF0000AA,"Nemozes koristiti tu komandu!"); // This Code return the Player IF he's not Login in as RCON admin
   return 1;
}
this is code this is error
pawn Код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\gamemodes\BARP.pwn(460) : error 021: symbol already defined: "strtok"
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\gamemodes\BARP.pwn(475) : error 047: array sizes do not match, or destination array is too small
HELP PLEASE
Reply
#2

Use sscanf instead
Reply
#3

no when i put sscanf it says me fatal error 19
Reply
#4

Search in your script for strtok and delete it once, you've it already defined.

And show me please line 475
Reply
#5

i have only one
pawn Код:
return result;
Reply
#6

Код:
CMD:kick(playerid,params[]) {
       if(IsPlayerAdmin(playerid))
   {
      new tmp[450], tmp2[450], Index;
      tmp = strtok(params,Index);
      tmp2 = strtok(params,Index);
      if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "Koristi: /kick [playerid] [reason]"); //Check If Player Does Not Added "Reason and the ID"
      new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
      player1 = strval(tmp); // << player1 = ID of The Player
      if(!IsPlayerConnected(player1)) return SendClientMessage(playerid,0xFF0000AA,"Igrac nije online"); //<< Check If Player Connected Or Not
      GetPlayerName(player1, playername, sizeof(playername)); //get Selected Player Name
      GetPlayerName(playerid, adminname, sizeof(adminname)); //get Admin Name Who Use This command
         format(string,sizeof(string),"Admin %s je kikovao %s | Razlog ( %s )",adminname,playername,params[2]); //adminname = the player Who Use This command || playername = the Player who Going To Be kicked || params[2] = The Reason Of The Kick
         SendClientMessageToAll(0xFF0000AA,string); // Send Message To all Players.
         Kick(player1);
   } else return SendClientMessage(playerid,0xFF0000AA,"Nemozes koristiti tu komandu!"); // This Code return the Player IF he's not Login in as RCON admin
   return 1;
}
Reply
#7

now 4 errors
Reply
#8

Quote:
Originally Posted by Dejan12345
Посмотреть сообщение
now 4 errors
Always show us the Error code..

And no, you must have it 2 times in your script else you wouldn't get such errors..
Reply
#9

Quote:
Originally Posted by Dejan12345
Посмотреть сообщение
now 4 errors
Show the errors
Reply
#10

Quote:
Originally Posted by Dejan12345
Посмотреть сообщение
no when i put sscanf it says me fatal error 19
Fix it then... That's simply stating the plugin didn't actually start, so therefore, fix your runtimes.

If you are on windows, my tutorial regarding this, will fix it, usually.



Otherwise if you have NativeChecker in your plugins, and not in the right order, it will cause the other plugins after to not load at all.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)