[HELP]Syntax Error.
#1

I have been getting this error -
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.
And the line is -
pawn Код:
format(string,sizeof(string),"[%d.%d.%d] [%d:%d:%d]: %s : %s\r\n",day,month,year,hour,minute,second,SName1,text);
My code -
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;
}
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™
Reply


Messages In This Thread
[HELP]Syntax Error. - by Ronaldo_raul™ - 25.02.2012, 06:35
Re: [HELP]Syntax Error. - by JamesC - 25.02.2012, 07:36
Re: [HELP]Syntax Error. - by Ronaldo_raul™ - 25.02.2012, 07:46
Re: [HELP]Syntax Error. - by T0pAz - 25.02.2012, 07:53
Re: [HELP]Syntax Error. - by Ronaldo_raul™ - 25.02.2012, 07:58
Re: [HELP]Syntax Error. - by T0pAz - 25.02.2012, 08:04
Re: [HELP]Syntax Error. - by emokidx - 25.02.2012, 08:07

Forum Jump:


Users browsing this thread: 2 Guest(s)