Help write file
Hi, i need an example for this :
argv from console command to be wroted in a file For example : i have a file, and if i use command : amx_wfile <text>, that "text" to be added in my file . But on my file, i have some lines ; ex: 1) bla bla 2) hello 3) what you wany I want that "text" to added under my lines from my file Hope you are understand, thanks |
Re: Help write file
Code:
or simply Code:
|
Re: Help write file
ok, this is public
Code:
public add_rule(id,level,cid)So, i used command : amx_addrulle hello all After i use command: 1) Cleared all information from my file 2) Added only "hello" on file |
Re: Help write file
Change "w" to "a".
Of course it only prints hello, you only read one arg. if you wanna read all use read_args() |
Re: Help write file
works thanks
|
Re: Help write file
After
Code:
Code:
|
Re: Help write file
Code:
Is it better to use fputc()? |
Re: Help write file
I read somewhere that you shouldn't put the newline character in fprintf, because it will just be written out as ^n, instead of actually making a newline. I don't know its validity, though, it was in reference to C and not Pawn.
|
| All times are GMT -4. The time now is 00:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.