Raised This Month: $ Target: $400
 0% 

"delete_file" Can't delete "csstats.dat"?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
griefhy
Member
Join Date: Jul 2006
Old 11-30-2007 , 21:05   "delete_file" Can't delete "csstats.dat"?
Reply With Quote #1

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
griefhy is offline
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 11-30-2007 , 21:16   Re: "delete_file" Can't delete "csstats.dat"?
Reply With Quote #2

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   }
__________________
alien is offline
Send a message via ICQ to alien
griefhy
Member
Join Date: Jul 2006
Old 11-30-2007 , 21:32   Re: "delete_file" Can't delete "csstats.dat"?
Reply With Quote #3

Thank you for your replies, but can't delete!
griefhy is offline
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 11-30-2007 , 21:55   Re: "delete_file" Can't delete "csstats.dat"?
Reply With Quote #4

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 ...
__________________
alien is offline
Send a message via ICQ to alien
griefhy
Member
Join Date: Jul 2006
Old 11-30-2007 , 22:18   Re: "delete_file" Can't delete "csstats.dat"?
Reply With Quote #5

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?
griefhy is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 12-01-2007 , 01:32   Re: "delete_file" Can't delete "csstats.dat"?
Reply With Quote #6

Delete the file when the server isn't running?
__________________
M249-M4A1 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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