Armanish
Компетентный
При загрузке с базы, сервер крашит при большой базе, на базе с 50 аккаунтами все нормально, из-за чего может быть?
server log:
код
server log:
PHP:
[05:00:10] [debug] Server crashed while executing new.amx
[05:00:10] [debug] AMX backtrace:
[05:00:10] [debug] #0 native format () in samp03svr
[05:00:10] [debug] #1 0133af9c in public top_player (top_id=4) at new.pwn:85675
PHP:
new update_top[5][11][33];
new update_top_prize[5][11];
new update_top_prize_text[5][13] =
{
"Денег",
"Очков",
"Убийств",
"Минут",
"Убийств"
};
new top_mysql_text[5][15] =
{
"Money",
"Scores",
"Kills",
"Minutes",
"akills"
};
forward top_player(top_id);
public top_player(top_id)
{
new rows;
cache_get_row_count(rows);
if(rows)
{
for(new i = 0; i < rows; i++)
{
cache_get_value_name(i, "name", update_top[top_id][i], 24);
cache_get_value_name_int(i, top_mysql_text[top_id], update_top_prize[top_id][i]);
if(strlen(update_top[top_id][i]) < 2) format(update_top[top_id][i], MAX_PLAYER_NAME, "None");
}
}
return 1;
}
ModeInit:
new fix_str[150];
for(new i = 0; i < 5; i++) {
fix_str[0] = EOS;
mysql_format(connect_mysql, fix_str, sizeof(fix_str), "SELECT `name`, `%s` FROM `accounts` WHERE `%s` > 0 ORDER BY `%s` DESC LIMIT 10", top_mysql_text[i], top_mysql_text[i], top_mysql_text[i]);
mysql_tquery(connect_mysql, fix_str, "top_player", "i", i);
}
85675 строка - cache_get_value_name(i, "name", update_top[top_id][i], 24);
