25.02.2012, 06:35
I have been getting this error -
And the line is -
My code -
What i am actually trying to make ?
Well, i am making a suggestion command so when a player types /suggest an input dialog will appear and whatever the player enter is saved in a file.
Regards,
Ronaldo_raul™
pawn Код:
\gamemodes\mortals.pwn(17479) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
pawn Код:
format(string,sizeof(string),"[%d.%d.%d] [%d:%d:%d]: %s : %s\r\n",day,month,year,hour,minute,second,SName1,text);
pawn Код:
stock SName1(playerid)
{
new SName1[MAX_PLAYER_NAME];
GetPlayerName(playerid,SName1,sizeof(SName1));
return SName1;
}
forward SaveToFile(filename[],text[]);
public SaveToFile(filename[],text[])
{
new File:File, filepath[256], string[256], year,month,day, hour,minute,second;
getdate(year,month,day); gettime(hour,minute,second);
format(filepath,sizeof(filepath),"/Suggestions/%s.txt",filename);
File = fopen(filepath,io_append);
format(string,sizeof(string),"[%d.%d.%d] [%d:%d:%d]: %s : %s\r\n",day,month,year,hour,minute,second,SName1,text);
fwrite(File,string);
fclose(File);
return 1;
}
Well, i am making a suggestion command so when a player types /suggest an input dialog will appear and whatever the player enter is saved in a file.
Regards,
Ronaldo_raul™