AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   function not found (https://forums.alliedmods.net/showthread.php?t=120918)

drekes 03-09-2010 13:16

function not found
 
Hi, again it's me with my jb problems.
now i get an error but i can't find find the problem.

This is the error:
PHP Code:

19:06:15 L 03/09/2010 19:02:32: [AMXXDisplaying debug trace (plugin "jailbreak_main.amxx")
19:06:15 L 03/09/2010 19:02:32: [AMXXRun time error 19: function not found 
19
:06:15 L 03/09/2010 19:02:32: [AMXX]    [0jailbreak_main.sma::plugin_init (line 120

and the plugin:
PHP Code:

/* Plugin made by Toast. Ultimate All In One Jailbreak Mod/ ©2009 , Toast's Plugins. */
/* Always feel free to edit my codes, but please give me credit for them.*/

#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <engine>


#define PLUGIN "Ultimate all in one Jailbreak mod"
#define VERSION "1.0"
#define AUTHOR "Toast"

#define OFFSET_PRIMARYWEAPON        116

new g_iGameNamer
new Trie:g_tBuyCommands
new g_iMaxPlayers


new const szBuyCommands[][] =
{
    
"usp""glock""deagle""p228""elites",
    
"fn57""m3""xm1014""mp5""tmp""p90",
    
"mac10""ump45""ak47""galil""famas",
    
"sg552""m4a1""aug""scout""awp""g3sg1",
    
"sg550""m249""vest""vesthelm""flash",
    
"hegren""sgren""defuser""nvgs""shield",
    
"primammo""secammo""km45""9x19mm""nighthawk",
    
"228compact""fiveseven""12gauge""autoshotgun",
    
"mp""c90""cv47""defender""clarion""krieg552",
    
"bullpup""magnum""d3au1""krieg550"
    
"buy""buyammo1""buyammo2""buyequip""cl_autobuy",
    
"cl_rebuy""cl_setautobuy""cl_setrebuy"
}

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_event("HLTV""event_round_start""a""1=0""2=0");
    
    
register_forward(FM_GetGameDescription"GameDesc")
    
    
g_iGameNamer register_cvar("amx_gamename""DC Jailbreak")
    
    
RegisterHam(Ham_Spawn"player""PlayerSpawn"1)
    
    
g_tBuyCommands TrieCreate();
    for(new 
0sizeof(szBuyCommands); i++)
    {
        
TrieSetCell(g_tBuyCommandsszBuyCommands[i], i);
    }
}

public 
plugin_cfg()
{
    
g_iMaxPlayers get_maxplayers()
}
public 
PlayerSpawn(id)

    for( new 
1<= g_iMaxPlayers i++ )
    {
        if(!
is_user_connected(id)
        ||(
is_user_bot(id))
        ||(!
is_user_alive(id)))
        {
            return 
PLUGIN_HANDLED
        
}

        {
            
set_user_rendering(idkRenderFxGlowShell000kRenderNormal20)
            
set_pdata_int(idOFFSET_PRIMARYWEAPON0)
            
set_task(1.0"strip_weapons"id)
        }
    }
    return 
PLUGIN_HANDLED
}

public 
GameDesc()

    static 
gamename[32]

    
get_pcvar_string(g_iGameNamergamename31)
    
forward_return(FMV_STRINGgamename)
    return 
FMRES_SUPERCEDE
}

public 
Player_Jump(id)
{
    if( 
is_user_alive(id) && entity_get_float(idEV_FL_fuser2) > 0.0 )
    {
        
entity_set_float(idEV_FL_fuser20.0)
    }
}


public 
client_command(client)
{
    if(!
is_user_alive(client))
    {
        return 
PLUGIN_CONTINUE
    
}

    static 
szArg[15]

    if(
read_argv(0szArg14) > 13)
    {
        return 
PLUGIN_CONTINUE
    
}

    
strtolower(szArg);
    if(
TrieKeyExists(g_tBuyCommandsszArg)
    && (
<< (_:cs_get_user_team(client)) & ((<<(_:CS_TEAM_T)) | (<<(_:CS_TEAM_CT)))))
    {
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

public 
strip_weapons(id)
{
    
strip_user_weapons(id)
    
give_item(id"weapon_knife")
}

public 
plugin_end()
{
    
TrieDestroy(g_tBuyCommands)


Thanks in advance, Drekes

Arkshine 03-09-2010 13:32

Re: function not found
 
register_event("HLTV", "event_round_start", "a", "1=0", "2=0"); is not used.

drekes 03-09-2010 13:36

Re: function not found
 
ok that fixed it.
because 1 part is'nt used it crashes my complete plugin?
weird

Tnx

hleV 03-09-2010 13:40

Re: function not found
 
It shouldn't crash your plugin, it's just a debug message.

drekes 03-09-2010 13:47

Re: function not found
 
When it happend, nothing worked,
no stripping weapons
no game change
etc...

Zombiezzz 03-09-2010 13:49

Re: function not found
 
PHP Code:

/* Plugin made by Toast 

:crab:

worldspawn 03-09-2010 13:52

Re: function not found
 
-the code that you gave us compiles without errors
-u have problems with plugin "jailbreak_main.amxx"
-#define AUTHOR "Toast"

grimvh2 03-09-2010 14:18

Re: function not found
 
Quote:

Originally Posted by hleV (Post 1112866)
It shouldn't crash your plugin, it's just a debug message.

I tought when the function is not found, everything that is registered under that function will not get registered at all. I think I had this a few times.

Emp` 03-09-2010 14:23

Re: function not found
 
When there is a run time error, nothing after the error in the function is called.

drekes 03-09-2010 14:58

Re: function not found
 
Quote:

Originally Posted by Zombiezzz (Post 1112877)
PHP Code:

/* Plugin made by Toast 

:crab:

PHP Code:

/* Plugin made by Toast. Ultimate All In One Jailbreak Mod/ ©2009 , Toast's Plugins. */
/* Always feel free to edit my codes, but please give me credit for them.*

#define AUTHOR "Toast"/ 

Read the full text before you crab, dude
And i give him credit by leaving the text and the author on him.


All times are GMT -4. The time now is 08:43.

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