Writing files problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Writing files problem (
/showthread.php?tid=125224)
Writing files problem -
Peep - 02.02.2010
i made that the admin announces will save to announce.log. All works ,even lines are coming to announce.log m but text i dont see.
Whats the problem?
i use:
forward AnnounceLog(string[]);
public AnnounceLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\n",string);
new File:hFile;
hFile = fopen("logs/Announce.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
And AnnounceLog(string); in /announce command.
Re: Writing files problem -
LuxurioN™ - 02.02.2010
Try this:
pawn Код:
public AnnounceLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\r\n",string);
new File:hFile;
hFile = fopen("Announce.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
return 1;
}
Re: Writing files problem -
Peep - 02.02.2010
Quote:
|
Originally Posted by © Tђэ LυxυяiσN™
Try this:
pawn Код:
public AnnounceLog(string[]) { new entry[256]; format(entry, sizeof(entry), "%s\r\n",string); new File:hFile; hFile = fopen("Announce.log", io_append); fwrite(hFile, entry); fclose(hFile); return 1; }
|
Still i dont see the text in announce.log . Lines are but text is invisible.
Re: Writing files problem -
LuxurioN™ - 02.02.2010
This code is perfectly working, I have tested, and not have problems!
Show the '/announce' command
Re: Writing files problem -
Peep - 02.02.2010
Quote:
|
Originally Posted by © Tђэ LυxυяiσN™
This code is perfectly working, I have tested, and not have problems!
Show the '/announce' command
|
I got it works , thanx for answering.
Error/bug was in /announce .