I get the following error when compiling this code:
Code:
(41) : error 035: argument type mismatch (argument 1)
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "ZombieAdder"
#define VERSION "1.0"
#define AUTHOR "Kamil"
new g_pcvarzombies
new g_pcvarzombiehp
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
g_pcvarzombies = register_cvar("addzombies", "25")
g_pcvarzombiehp = register_cvar("zombiehp", "300")
register_event("ResetHUD", "zombie_health", "e")
if(get_pcvar_num(g_pcvarzombies))
set_addzombies()
}
public set_addzombies()
{
for (new i = 1; i <= get_pcvar_num(g_pcvarzombies); i++)
{
set_task(float(i) * 0.5, "addzombies")
}
}
public addzombies()
{
server_cmd("addcustombot Zombie Domo 9.9")
}
public zombie_health(id)
{
if(is_user_bot(id))
{
set_user_health(id, get_cvar_num(g_pcvarzombiehp))
}
return PLUGIN_CONTINUE
}