Having problem with my command. -
Hello.
I'm wanna show you this strange error. I was compiling the command and it gave me a strange error. Below!
Код:
CMD:psetname(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 6) {
new tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(isnull(tmp) || isnull(tmp2)) return SendClientMessage(playerid, red, "USAGE: /psetname [playerid] [new name]");
new player1 = strval(tmp), length = strlen(tmp2), string[128];
if(length < 3 || length > MAX_PLAYER_NAME) return SendClientMessage(playerid,red,"ERROR: Incorrect Name Length");
if(PlayerInfo[player1][Level] == 8 && PlayerInfo[playerid][Level] != 8) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
new file[256],file2[256];
format(file,sizeof(file),"/ladmin/users/%s.sav",pName(player1));
format(file,sizeof(file),"/ladmin/users/%s.sav",tmp2);
frename(file, file2);
CMDMessageToAdmins(playerid,"PSETNAME");
format(string, sizeof(string), "{00C7FF}You have permanently set \"%s's\" name to \"%s\" ", pName(player1), tmp2); SendClientMessage(playerid,red,string);
if(player1 != playerid) { format(string,sizeof(string),"{00C7FF}Administrator \"%s\" has permanently set your name to \"%s\" ", pName(playerid), tmp2); SendClientMessage(player1,red,string); }
PlayerInfo[playerid][God] = 0;
SetPlayerHealth(player1, 100);
SetPlayerName(player1, tmp2);
return OnPlayerConnect(player1);
} else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
Re: Having problem with my command. -
Re: Having problem with my command. -
There's no such a thing as "frename" you have to write your own function or find someone's
Re: Having problem with my command. -