12.03.2011, 18:23
Ok, i just made a super basic chat log. The code is pretty decent. BUT, i get this error:
F:\dmserver\filterscripts\chatlog.pwn(20) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
CODE:
What should i do
F:\dmserver\filterscripts\chatlog.pwn(20) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
CODE:
pawn Код:
#include <a_samp>
#include <file>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("CHATLOG");
return 1;
}
#else
main()
{
print("Made BY: MATT");
}
#endif
public OnPlayerText(playerid, text[])
{
new File:chatlog = fopen("/logs/ChatLog.txt",io_append),chat[128],chater[128],hour,minute,second;
GetPlayerName(playerid,chater,sizeof(chater));
gettime(hour,minute,second);
format(chat,sizeof(chat),"[%d:%d:%d]: ( %s ): %s\n",hour,minute,second,chater,text);
if(chatlog)
{
if(fexist("chatlog.txt"))
{
fwrite(chatlog,chat);
fclose(chatlog);
}
}
return 1;
}