i got 7 errors in this VERRY litle plugin
Code:
* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#define PLUGIN "recover_hp"
#define VERSION "1.0"
#define AUTHOR "wouter"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("Damage", "recover_hp", "be")
register_cvar("amxx_recoverhp", "1")
register_cvar("amxx_recoverhp_amount", "Float:fvalue = 0.5")
if ( ! get_cvar_num("amxx_recoverhp") )
return PLUGIN_HANDLED
new recover_amount = Float: get_cvar_float("amxx_recoverhp_amount")
new damage = read_data(2) // tag mismatch
new health = get_user_health(id) // undivined symbol "id"
public recover_hp(id) { // invalide expresion, asumed zero ; undifined symbol "recover_hp"
if ( health <= 100) {
set_user_health(id, health + damage*recover_amount); // undefined symbol "id" ; expresion has no effext ; expected token: ; but found } ; invalid expresion, asumed zero
}
else if (health >= 100) {
return PLUGIN_HANDLED
}
}
}
http://forums.alliedmods.net/showthread.php?t=25082