Raised This Month: $51 Target: $400
 12% 

Help me fix these errors the AMXX compier shows


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 10-22-2021 , 14:44   Help me fix these errors the AMXX compier shows
Reply With Quote #1

Hello. I tried to add a plugin that add bot-support for using grenades: fire, flare and frost.

Firstly, i i got the following 1 error:

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// zps_bot_support_1.0.sma
// C:\My Folder\Games\Counter-Strike 1.6 (Servers)\Official Zombie Mod\Official Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(14 : error 017: undefined symbol "zp_get_user_bombardier"
//
// 1 Error.
// Could not locate output file C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\compiled \zps_bot_support_1.0.amx (compile failed).
//
// Compilation Time: 0.48 sec
// ----------------------------------------

Press enter to exit ...

Maybe, because my zombie server (ZPA 1.6.1) doesn't have the Bombardier game mode. Then, i opened the "zps_bot_support_1.0.sma" and deleted the following code:

PHP Code:
        // Support for bots - Bombardier
        
else if ( zp_get_user_bombardierindex ) && !zp_get_user_zombiepindex ) )
        {
            
Func_Throw_NapalmInfectindex );
        }
    } 
After i eleted the code shown above, i got the following 15 errors when i tried to cimpile the .sma file:

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// zps_bot_support_1.0.sma
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(93) : error 017: undefined symbol "Func_Throw_Flare"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(9 : error 017: undefined symbol "Func_Throw_NapalmInfect"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(103) : error 017: undefined symbol "Func_Throw_Frost"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(10 : error 017: undefined symbol "Func_Throw_Frost"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(123) : error 017: undefined symbol "Func_Throw_Flare"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(12 : error 017: undefined symbol "Func_Throw_NapalmInfect"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(133) : error 017: undefined symbol "Func_Throw_Frost"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(13 : error 017: undefined symbol "Func_Throw_Frost"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(150) : warning 217: loose indentation
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(150) : error 029: invalid expression, assumed zero
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(150) : error 017: undefined symbol "Func_Throw_NapalmInfect"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(163) : error 029: invalid expression, assumed zero
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(163) : error 017: undefined symbol "Func_Throw_Frost"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(176) : error 029: invalid expression, assumed zero
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(176) : error 017: undefined symbol "Func_Throw_Flare"
// C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(191) : error 001: expected token: "}", but found "-end of file-"
//
// 15 Errors.
// Could not locate output file C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\compiled \zps_bot_support_1.0.amx (compile failed).
//
// Compilation Time: 0.52 sec
// ----------------------------------------

Press enter to exit ...


Here is the full (original code) of the .sma file i want to compile:

PHP Code:
/*
    ----------------------
    -*- Licensing Info -*-
    ----------------------

    [ZPS] Bot Support
    Copyright (C) abdul-rehman

    This is an edited version by ROKronoS

    Website: http://zpshade.esy.es/
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    In addition, as a special exception, the author gives permission to
    link the code of this program with the Half-Life Game Engine ("HL
    Engine") and Modified Game Libraries ("MODs") developed by Valve,
    L.L.C ("Valve"). You must obey the GNU General Public License in all
    respects for all of the code used other than the HL Engine and MODs
    from Valve. If you modify this file, you may extend this exception
    to your version of the file, but you are not obligated to do so. If
    you do not wish to do so, delete this exception statement from your
    version.

    ---------------
    -*- Credits -*-
    ---------------

    * MeRcyLeZZ: for developing Zombie Plague
    * abdul-rehman: for developing the plugin
    * Sn!ff3R: for providing a useful forward to detect whether the bot is aiming at a player or not
    * Bugsy: for helping me with forcing the bots to press the attack button

    ----------------------
    -*-   Changelog    -*
    ----------------------

    * v1.0 - 17.09.2015
    - Initial release
    - Added support for bombardiers

*/

#include < amxmodx >
#include < hamsandwich >
#include < zombieplague >

// Offsets
new const OFFSET_ACTIVE_ITEM 373;
new const 
OFFSET_LINUX 5;

// CVAR's
new cvar_throw_chance

public plugin_init( )
{
    
register_plugin"[ZPS] Bot Support""1.0""WiLS, abdul-rehman & ROKronoS" );
    
    
register_event"StatusValue""Event_Nade_Throw""be""1=2""2!0" );
    
    
cvar_throw_chance register_cvar"zp_nade_throw_chance""1" );
}

// Thanks to Sn!ff3R
public Event_Nade_Throwindex )
{
    
// Get the index of the player at which the bot is aiming
    
new pindex read_data);

    if ( 
is_user_botindex ) && is_user_aliveindex ) && is_user_alivepindex ) )
    {
        
// Support for bots - Humans
        
if ( !zp_get_user_zombieindex ) && zp_get_user_zombiepindex ) )
        {
            if ( !
get_pcvar_numcvar_throw_chance ) )
            {
                switch ( 
random_num0) )
                {
                    case 
0:
                    {
                        
// Throw flare
                        
Func_Throw_Flareindex );
                    }
                    case 
1:
                    {
                        
// Throw napalm nade
                        
Func_Throw_NapalmInfectindex );
                    }
                    case 
2:
                    {
                        
// Throw frost nade
                        
Func_Throw_Frostindex );
                    }
                    case 
3:
                    {
                        
// Throw frost nade
                        
Func_Throw_Frostindex );

                        
// Throw napalm nade after a time
                        
set_task0.8"Func_Throw_NapalmInfect"index );
                    }
                }
            }
            else
            {
                new 
cvar_value get_pcvar_numcvar_throw_chance );
                new 
chance random_num0cvar_value 3);

                if ( 
chance == cvar_value )
                {
                    
// Throw flare
                    
Func_Throw_Flareindex )
                }
                else if ( 
chance == cvar_value )
                {
                    
// Throw napalm nade
                    
Func_Throw_NapalmInfectindex );
                }
                else if ( 
chance == cvar_value )
                {
                    
// Throw frost nade
                    
Func_Throw_Frostindex );
                }
                else if ( 
chance == cvar_value )
                {
                    
// Throw frost nade
                    
Func_Throw_Frostindex );

                    
// Throw napalm nade after a time
                    
set_task0.8"Func_Throw_NapalmInfect"index );
                }
                else
                    return;
            }
        }
        
// Support for bots - Bombardier
        
else if ( zp_get_user_bombardierindex ) && !zp_get_user_zombiepindex ) )
        {
            
Func_Throw_NapalmInfectindex );
        }
    }
}

public 
Func_Throw_NapalmInfectindex )
{
    
// Check whether the bot has napalm/infection nade
    
if ( user_has_weaponindexCSW_HEGRENADE ) )
    {
        
// Switch to nade
        
engclient_cmdindex"weapon_hegrenade" );
        
        
// Forced throw [Thanks to Bugsy]
        
ExecuteHamHam_Weapon_PrimaryAttackget_pdata_cbaseindexOFFSET_ACTIVE_ITEMOFFSET_LINUX ) );
    }
}

public 
Func_Throw_Frostindex )
{
    
// Check whether the bot has frost nade
    
if ( user_has_weaponindexCSW_FLASHBANG ) )
    {
        
// Switch to nade
        
engclient_cmdindex"weapon_flashbang" );
        
        
// Forced throw [Thanks to Bugsy]
        
ExecuteHamHam_Weapon_PrimaryAttackget_pdata_cbaseindexOFFSET_ACTIVE_ITEMOFFSET_LINUX ) );
    }
}

public 
Func_Throw_Flareindex )
{
    
// Check whether the user haves Frost Nade
    
if ( user_has_weaponindexCSW_SMOKEGRENADE ) )
    {
        
// Switch to nade
        
engclient_cmdindex"weapon_smokegrenade" );
        
        
// Forced throw [Thanks to Bugsy]
        
ExecuteHamHam_Weapon_PrimaryAttackget_pdata_cbaseindexOFFSET_ACTIVE_ITEMOFFSET_LINUX ) );
    }

So, wjy did these errors occur? can someone fix them, or at least tell me how to fix them by myself?

Thanks in advance.

Last edited by GlobalPlague; 10-22-2021 at 14:50.
GlobalPlague is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-22-2021 , 21:02   Re: Help me fix these errors the AMXX compier shows
Reply With Quote #2

Quote:
Originally Posted by GlobalPlague View Post

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// zps_bot_support_1.0.sma
// C:\My Folder\Games\Counter-Strike 1.6 (Servers)\Official Zombie Mod\Official Zombie Mod\cstrike\addons\amxmodx\scripting\zps_bot_ support_1.0.sma(14 : error 017: undefined symbol "zp_get_user_bombardier"
//
// 1 Error.
// Could not locate output file C:\My Folder\Zombie Mod\cstrike\addons\amxmodx\scripting\compiled \zps_bot_support_1.0.amx (compile failed).
//
// Compilation Time: 0.48 sec
// ----------------------------------------

Press enter to exit ...

Maybe, because my zombie server (ZPA 1.6.1) doesn't have the Bombardier game mode.
This error has nothing to do with what's on your server (because it's not running on your server yet at this point). It's expecting this function to exist which probably means you're using the wrong include file or you modified something from the original file.

However, you probably should make sure that all your ZP plugins have compatible versions before you start trying to change anything.
__________________

Last edited by fysiks; 10-22-2021 at 21:03.
fysiks is online now
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 10-23-2021 , 14:40   Re: Help me fix these errors the AMXX compier shows
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
This error has nothing to do with what's on your server (because it's not running on your server yet at this point). It's expecting this function to exist which probably means you're using the wrong include file or you modified something from the original file.

However, you probably should make sure that all your ZP plugins have compatible versions before you start trying to change anything.
Thanks for the suggestion.
GlobalPlague is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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