AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Compile error 017: undefined symbol "fm_set_user_health" (https://forums.alliedmods.net/showthread.php?t=243963)

sawled 07-12-2014 02:06

Compile error 017: undefined symbol "fm_set_user_health"
 
PHP Code:

public message_health(msg_idmsg_destmsg_entity)
{
    
// Get player's health
    
static health
    health 
get_msg_arg_int(1)
    
    
// Don't bother
    
if (health 256) return;
    
    
// Check if we need to fix it
    
if (health 256 == 0)
        
fm_set_user_health(msg_entitypev(msg_entitypev_health) + 1)
    
    
// HUD can only show as much as 255 hp
    
set_msg_arg_int(1get_msg_argtype(1), 255)


Error line -
PHP Code:

fm_set_user_health(msg_entitypev(msg_entitypev_health) + 1


Eagle07 07-12-2014 02:09

Re: Compile error 017: undefined symbol "fm_set_user_health"
 
you need include
add
PHP Code:

#include <fakemeta_util> 


Mario AR. 07-12-2014 02:17

Re: Compile error 017: undefined symbol "fm_set_user_health"
 
Add:
PHP Code:

#define fm_set_user_health(%0,%1) set_pev(%0,pev_health,%1) 


YamiKaitou 07-12-2014 02:22

Re: Compile error 017: undefined symbol "fm_set_user_health"
 
There is no reason to use fm_set_user_health when set_user_health works just fine

sawled 07-12-2014 02:35

Re: Compile error 017: undefined symbol "fm_set_user_health"
 
Quote:

Originally Posted by Eagle07 (Post 2166202)
you need include
add
PHP Code:

#include <fakemeta_util> 


It worked, thank you all :fox:

fysiks 07-12-2014 02:38

Re: Compile error 017: undefined symbol "fm_set_user_health"
 
You should use set_user_health().


All times are GMT -4. The time now is 21:13.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.