AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   "delete_file" Can't delete "csstats.dat"? (https://forums.alliedmods.net/showthread.php?t=63825)

griefhy 11-30-2007 21:05

"delete_file" Can't delete "csstats.dat"?
 
For example :
public plugin_end()
{
new path[65]
new dat[16]
get_localinfo( "amxx_datadir", path, 64 )
format(dat, 50,"%s/csstats.dat", path )
if( file_exists( dat ) )
{
log_amx("file is %s",dat)
delete_file(dat)
}
return PLUGIN_CONTINUE
}
Why can't delete? Other files are all right !help me ..thanks

alien 11-30-2007 21:16

Re: "delete_file" Can't delete "csstats.dat"?
 
Code:
public plugin_end()   {     new path[65]     new dat[128]     get_localinfo( "amxx_datadir", path, 64 )     format(dat, 127,"%s/csstats.dat", path )     if (file_exists(dat))       {         log_amx("file is %s",dat)         delete_file(dat)       }         return PLUGIN_CONTINUE   }

griefhy 11-30-2007 21:32

Re: "delete_file" Can't delete "csstats.dat"?
 
Thank you for your replies, but can't delete!

alien 11-30-2007 21:55

Re: "delete_file" Can't delete "csstats.dat"?
 
That code works for me, but I'm not using csstats.
Maybe the file is locked for exclusive usage of another plugin ...

That might be the cause ...

griefhy 11-30-2007 22:18

Re: "delete_file" Can't delete "csstats.dat"?
 
yes ,i think so
if put in "plugin_init",it is all right!
Excuse me, you do not use " csstats " ,Then how to keep the data?

M249-M4A1 12-01-2007 01:32

Re: "delete_file" Can't delete "csstats.dat"?
 
Delete the file when the server isn't running?


All times are GMT -4. The time now is 11:10.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.