Having problem with my command.
#1

Hello.

I'm wanna show you this strange error. I was compiling the command and it gave me a strange error. Below!

The command

Код:
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");
}
Now for the ERROR.

Код:
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\samp037_svr_R2-1-1_win32\gamemodes\NFTDM.pwn(11549) : error 017: undefined symbol "frename"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.

THE 11549 Line:

Код:
frename(file, file2);
Could you tell me what's the problem in it? If so, Please answer
Reply
#2

http://forum.sa-mp.com/showpost.php?...32&postcount=2
Reply
#3

There's no such a thing as "frename" you have to write your own function or find someone's
Reply
#4

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)