Raised This Month: $ Target: $400
 0% 

File write / read


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 08-21-2013 , 06:30   Re: File write / read
Reply With Quote #1

its not really good idea to keep reading the file several times, do it once and save the names to a dynamic array or something like that.

also was your name CryWolf when you tested it, cause i saw this in the code:
Code:
if ( !filep )
	{
		write_file ( filen, "; File Names, 0.3 by CryWolf." );
		write_file ( filen, "; Format: [ date ] < username > | < SteamID > | < IP >" );
	}
and you check for the names like this:
Code:
if ( containi ( szData, szName ) )
jimaway is offline
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 08-21-2013 , 06:43   Re: File write / read
Reply With Quote #2

nope, my name was JasoN when i tested it!
btw i think you did not understand me plugin problems are
1. File is created but it's always empty even these are not on it
Code:
write_file ( filen, "; File Names, 0.3 by CryWolf." );
		write_file ( filen, "; Format: [ date ] < username > | < SteamID > | < IP >" );
2. I can't not use the comand it said that i am already on the list

and 3rd i whanna know how to read names from file and print it to a motd, i don't need to optimize nothing yet

AMXX 1.8.2
Metamod12.1-am
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
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 15:55.


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