im having a problem with my plugin im getting this error message when i compile that says array index out of bounds and function must return a value can someone help me correct these errors see code below
Code:
//------------Source Code-----------\\
//Vampire Mod
//By Zidd
//A Version Half-life engine version of an unreal tournament mutator
#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init () {
register_plugin("Vampire Mode", "0.01", "Zidd")
register_clcmd("amx_vampire", "vampire", ADMIN_BAN, " : Sets Vampire Mode")
}
public vampire (id) {
new makekill [32]
get_user_frags( id )
new health [32]
get_user_health( id )
// What Should Happen When You Reach 1 HP
if ( health [32] = 1 ) {
client_print (1,print_center,"You Thirst For Blood Go Get Some Kills For More HP!")
set_task (0.5,"vampire",id)
return PLUGIN_HANDLED
}
//What Should Happen When You Have More Than 1 HP
if (health[32] < 1) {
set_user_health (id,(health[32] -1))
set_task (0.5,"vampire",id)
return PLUGIN_HANDLED
}
//What Should Happen When You Get A Kill
if (makekill[32] +1) {
set_user_health (id,(health[32]+10))
client_print (1,print_center,"You Get 10HP For The Kill You Just Made")
set_task (0.5,"vampire",id)
return PLUGIN_HANDLED
}
}