warning 224: indeterminate array size in "sizeof" expression (symbol "")
Код:
source\themallards\utils.inc(23) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
Собственно, ошибка заключается в функции логгирования.
PHP код:
stock Log(const filename[], const message[])
{
static const fmt_str[] =
"\r\n[%02d/%02d/%02d %02d:%02d:%02d] %s %s";
new File:filehandle,
string[sizeof(fmt_str) + sizeof(message)], // строка 23
year,
month,
day,
hour,
minute,
second;
if(!(filehandle = fopen(filename, io_append)))
return -1;
getdate(year, month, day);
gettime(hour, minute, second);
format(string, sizeof(string), fmt_str,
year, month, day, hour, minute, second, message);
for(new idx = 0, length = strlen(string); idx < length; idx++)
fputchar(filehandle, string[idx], false);
return fclose(filehandle);
}