Raised This Month: $ Target: $400
 0% 

[HELP] Run Time Error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 12-17-2015 , 09:46   [HELP] Run Time Error
Reply With Quote #1

Code:
L 12/16/2015 - 22:13:16: Start of error session.
L 12/16/2015 - 22:13:16: Info (map "zm_extreme_fixed") (file "addons/amxmodx/logs/error_20151216.log")
L 12/16/2015 - 22:13:16: [AMXX] Displaying debug trace (plugin "zp50_objective_remover.amxx")
L 12/16/2015 - 22:13:16: [AMXX] Run time error 7: stack low 
L 12/16/2015 - 22:13:16: [AMXX] Displaying debug trace (plugin "zp50_objective_remover.amxx")
L 12/16/2015 - 22:13:16: [AMXX] Run time error 7: stack low 
L 12/16/2015 - 22:13:16: [AMXX] Displaying debug trace (plugin "zp50_objective_remover.amxx")
L 12/16/2015 - 22:13:16: [AMXX] Run time error 7: stack low
any ideea?

PHP Code:
/*================================================================================
    
    ------------------------------
    -*- [ZP] Objective Remover -*-
    ------------------------------
    
    This plugin is part of Zombie Plague Mod and is distributed under the
    terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
    
================================================================================*/

#include <amxmodx>
#include <fakemeta>
#include <amx_settings_api>
#include <zp50_core_const>

// Settings file
new const ZP_SETTINGS_FILE[] = "zombieplague.ini"

new const objective_ents[][] = { "func_bomb_target" "info_bomb_target" "info_vip_start" "func_vip_safetyzone" "func_escapezone" "hostage_entity" "monster_scientist" "func_hostage_rescue" "info_hostage_rescue" }

#define CLASSNAME_MAX_LENGTH 32

new Array:g_objective_ents

new g_fwSpawn
new g_fwPrecacheSound

public plugin_init()
{
    
register_plugin("[ZP] Objective Remover"ZP_VERSION_STRING"ZP Dev Team")
    
unregister_forward(FM_Spawng_fwSpawn)
    
unregister_forward(FM_PrecacheSoundg_fwPrecacheSound)
    
register_forward(FM_EmitSound"fw_EmitSound")
    
register_message(get_user_msgid("Scenario"), "message_scenario")
    
register_message(get_user_msgid("HostagePos"), "message_hostagepos")
}

public 
plugin_precache()
{
    
// Initialize arrays
    
g_objective_ents ArrayCreate(CLASSNAME_MAX_LENGTH1)
    
    
// Load from external file
    
amx_load_setting_string_arr(ZP_SETTINGS_FILE"Objective Entities""OBJECTIVES"g_objective_ents)
    
    
// If we couldn't load from file, use and save default ones
    
new index
    
if (ArraySize(g_objective_ents) == 0)
    {
        for (
index 0index sizeof objective_entsindex++)
            
ArrayPushString(g_objective_entsobjective_ents[index])
        
        
// Save to external file
        
amx_save_setting_string_arr(ZP_SETTINGS_FILE"Objective Entities""OBJECTIVES"g_objective_ents)
    }
    
    
// Fake Hostage (to force round ending)
    
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"hostage_entity"))
    if (
pev_valid(ent))
    {
        
engfunc(EngFunc_SetOriginentFloat:{8192.0,8192.0,8192.0})
        
dllfunc(DLLFunc_Spawnent)
    }
    
    
// Prevent objective entities from spawning
    
g_fwSpawn register_forward(FM_Spawn"fw_Spawn")
    
    
// Prevent hostage sounds from being precached
    
g_fwPrecacheSound register_forward(FM_PrecacheSound"fw_PrecacheSound")
}

// Entity Spawn Forward
public fw_Spawn(entity)
{
    
// Invalid entity
    
if (!pev_valid(entity))
        return 
FMRES_IGNORED;
    
    
// Get classname
    
new classname[32], objective[32], size ArraySize(g_objective_ents)
    
pev(entitypev_classnameclassnamecharsmax(classname))
    
    
// Check whether it needs to be removed
    
new index
    
for (index 0index sizeindex++)
    {
        
ArrayGetString(g_objective_entsindexobjectivecharsmax(objective))
        
        if (
equal(classnameobjective))
        {
            
engfunc(EngFunc_RemoveEntityentity)
            return 
FMRES_SUPERCEDE;
        }
    }
    
    return 
FMRES_IGNORED;
}

// Sound Precache Forward
public fw_PrecacheSound(const sound[])
{
    
// Block all those unneeeded hostage sounds
    
if (equal(sound"hostage"7))
        return 
FMRES_SUPERCEDE;
    
    return 
FMRES_IGNORED;
}

// Emit Sound Forward
public fw_EmitSound(idchannel, const sample[], Float:volumeFloat:attnflagspitch)
{
    
// Block all those unneeeded hostage sounds
    
if (sample[0] == 'h' && sample[1] == 'o' && sample[2] == 's' && sample[3] == 't' && sample[4] == 'a' && sample[5] == 'g' && sample[6] == 'e')
        return 
FMRES_SUPERCEDE;
    
    return 
FMRES_IGNORED;
}

// Block hostage HUD display
public message_scenario()
{
    if (
get_msg_args() > 1)
    {
        new 
sprite[8]
        
get_msg_arg_string(2spritecharsmax(sprite))
        
        if (
equal(sprite"hostage"))
            return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

// Block hostages from appearing on radar
public message_hostagepos()
{
    return 
PLUGIN_HANDLED;

__________________
Depresie is offline
 



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 18:09.


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