A problem here
#1

pawn Код:
LoadServerStats()
{

    if(!fexist(SERVER_STATS)) return 1;

    new File: i_FileHandle = fopen("serverstat.ini", io_read), sz_FileStr[256];

    fread(i_FileHandle, sz_FileStr);
    sscanf(sz_FileStr, "p<,>iiiiiiiiiii", TotalLogin, TotalConnect, TotalAutoBan, TotalRegister, MaxPlayersConnected, MPDay, MPMonth, MPYear, MPHour, MPMinute, TotalUptime);
    return fclose(i_FileHandle);
}
This is for /serverstats command and it says a error when i do it this one
pawn Код:
error 035: argument type mismatch (argument 3)
Reply
#2

Because the callback is LoadServerStats() with no variables but you're checking if a file exists with the variable "SERVER_STATS". In order for that to make sense it would need to be, LoadServerStats(SERVER_STATS)
Reply
#3

Quote:
Originally Posted by The DeLuca
Посмотреть сообщение
Because the callback is LoadServerStats() with no variables but you're checking if a file exists with the variable "SERVER_STATS". In order for that to make sense it would need to be, LoadServerStats(SERVER_STATS)
No. It is probably defined somewhere else.

Which line is the error on?
Reply
#4

Код:
  new File: i_FileHandle = fopen("serverstat.ini", io_read), sz_FileStr[256];
That's your problem.
Reply
#5

Yeah, it does look sort of strange. Put them on seperate lines.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)