27.12.2009, 12:25
Here's how you would save text messages people have written into a file.
EDIT:
Most if not all of those warnings are saying that the variables appear twice. That meaning, you most likely have a global variable of that variable, and then created it later inside a specific callback/function.
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[128], name[24], entry[256];
format(string, sizeof(string), "%s(%i): %s", GetPlayerName(playerid, name, sizeof(name)), playerid, text);
format(entry, sizeof(entry), "%s\r\n", string);
new File:file;
file = fopen("Text", io_append);
if(file)
{
fwrite(file, string);
fclose(file);
}
return 1;
}
Most if not all of those warnings are saying that the variables appear twice. That meaning, you most likely have a global variable of that variable, and then created it later inside a specific callback/function.