AlliedModders

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

GlobalPlague 06-07-2023 17:51

error 017: undefined symbol "get_user_maxhealth"
 
When i try to compile a ZPA 1.6.1 plugin i made using the ready-to-use examples in "examples" folder, i get the following error:

error 017: undefined symbol "get_user_maxhealth"

This is the code segment the error comes from:

Code:

public zp_player_killed(victim, killer, weapon)
{
        // Check if it is our game mode
        if (zp_get_current_mode() == g_gameid)
        {
                // Check if the killer is a human and the victim is a zombie
                if (!zp_get_user_zombie(killer) && zp_get_user_zombie(victim))
                {
                        // Set the killer's health to full
                        set_user_health(killer, get_user_maxhealth(killer))
                }
        }

Can someone explain to me how to fix the error?

fysiks 06-07-2023 23:38

Re: error 017: undefined symbol "get_user_maxhealth"
 
If this is the original code for a working plugin, that function would either be defined in the plugin itself or one of it's custom include files. So, it sounds like you don't have either the original complete plugin source code or you don't have the correct include files.

The closest reference I could find was zp_get_user_maxhealth() in this post.

P.S. This better not be another ChatGPT thing . . .


All times are GMT -4. The time now is 10:24.

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