fremove
#7

Quote:
Originally Posted by NaS
Посмотреть сообщение
Well, you create it again, so why is it wrong that it still exists?

If this is a rename script, you should do "fcreate" with the new name (text variable), so

pawn Код:
fcreate(text); // format it first
instead of

pawn Код:
fcreate(filestring);
Yea, just that you don't reformat the "filestring"
you want to create a new file, but you create exactly the same file again (same name)
you should use
pawn Код:
format(filestring, sizeof(filestring), "Users/%s.ini", GetPlayerRName(target));
new File:Test = fopen(filestring);
fclose(Test);
fremove(filestring);
SetPlayerName(target, text);
format(filestring, sizeof(filestring), "User/%s.ini", text); //NEW LINE - Reformat filestring to make it point to the new location
fcreate(filestring);
Reply


Messages In This Thread
fremove - by streetpeace - 01.10.2014, 11:47
Re: fremove - by Sawalha - 01.10.2014, 11:53
Re : fremove - by streetpeace - 01.10.2014, 12:12
Re : fremove - by streetpeace - 01.10.2014, 14:17
AW: fremove - by NaS - 01.10.2014, 14:31
Re : fremove - by streetpeace - 01.10.2014, 14:45
Re: AW: fremove - by Sascha - 01.10.2014, 14:51
Re : fremove - by streetpeace - 01.10.2014, 17:57

Forum Jump:


Users browsing this thread: 1 Guest(s)