Renameaccount help
#1

error 017: undefined symbol "frename"
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]"oldnamenewname)) return SendClientMessage(playerid,RED"Correct Usage: /renameaccount [OldName][New name]");
    new 
filestring[128];
    new 
filestring2[128];
    
format(filestring2sizeof(filestring2), "/SARP/Users/%s.ini"oldname);
    if(!
fexist(filestring2)) return SendClientMessage(playeridRED"That account name doesn't exist!");
    
format(filestringsizeof(filestring), "/SARP/Users/%s.ini"newname);
    if(
fexist(filestring)) return SendClientMessage(playeridRED"The new name you've chosen is already taken");
    
frename(filestring2filestring);//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(stringsizeof(string), "You have successfully renamed %s's account to %s" ,oldnamenewname);
    
SendClientMessage(playeridREDstring);
    return 
1;

Reply
#2

I searched the script and did not find a frename in that cmd...
The command works fine but define frename is there is a way...
Reply
#3

Base in my searching.

frename is part of stock function in dutils.inc

Didn't remember, i use this code before..
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=385607 i should of mention i saw it here and ive been looking to edit player stuff even if there offline

Edit:PS it worked with dutiles
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)