Error while compiling [REP+] -
Dejan12345 - 26.07.2016
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
Re: Error while compiling [REP+] -
Deadpoop - 26.07.2016
Use sscanf instead
Re: Error while compiling [REP+] -
Dejan12345 - 26.07.2016
no when i put sscanf it says me fatal error 19
Re: Error while compiling [REP+] -
JustMe.77 - 26.07.2016
Search in your script for strtok and delete it once, you've it already defined.
And show me please line 475
Re: Error while compiling [REP+] -
Dejan12345 - 26.07.2016
i have only one
Re: Error while compiling [REP+] -
K0P - 26.07.2016
Код:
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;
}
Re: Error while compiling [REP+] -
Dejan12345 - 26.07.2016
now 4 errors
Re: Error while compiling [REP+] -
JustMe.77 - 26.07.2016
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..
Re: Error while compiling [REP+] -
K0P - 26.07.2016
Quote:
Originally Posted by Dejan12345
now 4 errors
|
Show the errors
Re: Error while compiling [REP+] -
Sew_Sumi - 26.07.2016
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.