I've searched this forum. Found something similar, but it doesn't make me smarter in this case. Please don't post a valid code, just tell me more than compiler does.
I commented lines, where the errors are.
Thanks.
PHP Code:
public SetConfig()
{
new config[64];
get_configsdir(config, sizeof(config) - 1);
add(config, sizeof(config) - 1, "/day.cfg");
if( file_exists(config) )
{
server_cmd("exec %s", config);
}
}
public itstime()
{
new hour[24]
get_time("%H", hour, 23)
if ( hour >= 22 || hour <= 6 /*** array must be indexed <variable "hour"> ***/
|| task_exists ("SetConfig", 0) )
{
remove_task("SetConfig" , 0) /*** argument type mismatch ***/
}
else
{
if ( hour > 6 && hour < 22 ) /*** array must be indexed <variable "hour"> ***/
{
set_task (1.0, "SetConfig")
}
return PLUGIN_HANDLED
}