hello ehm i make a code and i donīt know where is mistake
log
Code:
L 02/20/2009 - 20:38:49: [AMXX] Displaying debug trace (plugin "hns.amxx")
L 02/20/2009 - 20:38:49: [AMXX] Run time error 4: index out of bounds
L 02/20/2009 - 20:38:49: [AMXX] [0] hns.sma::timing (line 2996)
L 02/20/2009 - 20:40:49: Start of error session.
and my code
Code:
public restart(id)
{
if((get_user_flags(id) & ADMIN_KICK)) {
set_task(0.99, "timing", 459200, "", 0, "a", 10);
set_task(10.0, "finishedrr")
}
}
public timing(id)
{
counttovote++;
new speak[10][] = {"ten", "nine", "eight", "seven", "six", "five", "four", "three", "two", "one"};
if ( counttovote > 10) {
counttovote = 0;
return PLUGIN_HANDLED;
} else {
if (counttovote > 0 && counttovote <= 10) {
set_hudmessage(0, 222, 50, -1.0, 0.13, 0, 1.0, 0.94, 0.0, 0.0, 4);
show_hudmessage(0, "Server sa restartne za %d ", 10 - counttovote);
if (quiet != 1) {
client_cmd(0, "spk ^"fvox/%s^"", speak[0 +counttovote]);
}
}
}
return PLUGIN_HANDLED;
}
public finishedrr()
{
server_cmd("restart")
}