21.10.2012, 05:10
error 017: undefined symbol "frename"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
PHP код:
CMD:renameaccount(playerid,params[])
{
new oldname[128], newname[128], string[90];
if(sscanf(params,"s[128]s[128]", oldname, newname)) return SendClientMessage(playerid,RED, "Correct Usage: /renameaccount [OldName][New name]");
new filestring[128];
new filestring2[128];
format(filestring2, sizeof(filestring2), "/SARP/Users/%s.ini", oldname);
if(!fexist(filestring2)) return SendClientMessage(playerid, RED, "That account name doesn't exist!");
format(filestring, sizeof(filestring), "/SARP/Users/%s.ini", newname);
if(fexist(filestring)) return SendClientMessage(playerid, RED, "The new name you've chosen is already taken");
frename(filestring2, filestring);//this line how to define frename ?
new INI:File = INI_Open(filestring);
INI_SetTag(File, "data");
INI_WriteString(File,"Name", newname);
INI_Close(File);
format(string, sizeof(string), "You have successfully renamed %s's account to %s" ,oldname, newname);
SendClientMessage(playerid, RED, string);
return 1;
}