Writing files problem
#1

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.
Reply
#2

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;
}
Reply
#3

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.
Reply
#4

This code is perfectly working, I have tested, and not have problems!

Show the '/announce' command
Reply
#5

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 .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)