Raised This Month: $51 Target: $400
 12% 

Clear or delete a data file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
StrikerM
BANNED
Join Date: Nov 2019
Old 03-08-2021 , 17:09   Clear or delete a data file
Reply With Quote #1

Hello, how the title says.

I have a point system that i want to clear it some times, i don't want to clear it manually.
I want to use something like fdelete(filename); or something like that.

I am using this system just to remove every line, but is not cleared, i just 'spaced' every line.

Code:
public TEST2(id) 
{
	Linie = 0;
	new authid[32], Line[70], Arg1[32], Arg2[32], Arg3[11], FileOpen = fopen(File, "rt" );
	get_user_authid(id, authid, 31);

	while(!feof(FileOpen)) 
	{
		Linie++;
		fgets(FileOpen, Line, 70), trim(Line), parse(Line, Arg1, 31, Arg2, 31, Arg3, 11);
		write_file(File, "", Linie);
	}
	fclose(FileOpen);
	return PLUGIN_HANDLED;
}
StrikerM is offline
 



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 07:23.


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