AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   (native "callfunc_begin_i") (https://forums.alliedmods.net/showthread.php?t=226079)

MrKiller2010 09-13-2013 10:26

(native "callfunc_begin_i")
 
Code:

L 09/13/2013 - 16:13:14: Public function -1 is invalid
L 09/13/2013 - 16:13:14: [AMXX] Run time error 10 (plugin "BMSK.amxx") (native "callfunc_begin_i") - debug not enabled!
L 09/13/2013 - 16:13:14: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes)


PHP Code:

ActionPointBlock(ident)
{
        new 
Float:gametime get_gametime();
        if ( !( 
gametime >= g_pointblock_next_use[id] ) && ( get_user_team id ) == ) )
        {
                if ( !
g_has_hud_text[id] )
                {
                        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
                        
show_hudmessage(id"%s %s^nXP Block Block^nNext Use: 1 round"PLUGIN_PREFIXPLUGIN_VERSION );
                }
               
                return 
PLUGIN_HANDLED;
        }
       
        if(
get_user_team(id) == 2)
        {
                if ( !
g_has_hud_text[id] )
                {
                        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
                        
show_hudmessage(id"%s %s^nXP Block^nOnly Terrorists Can Use This Block"PLUGIN_PREFIXPLUGIN_VERSION );
                }
               
                return 
PLUGIN_HANDLED;
        }
       
        new 
property[5];
        
GetProperty(ent1property);
        if ( 
callfunc_begin_i(g_PM_hFuncg_PM_hPlugin) == ) {
        
callfunc_push_int(id);
        
callfunc_push_int(str_to_num(property));
        
callfunc_end();
        }
       
        
BM_Print(id"^3You just picked up^4 %i^3 more Points!"str_to_num(property));
       
        
emit_sound(idCHAN_STATICg_sound_pointblock1.0ATTN_NORM0PITCH_NORM);
       
        
g_block_status[id] = true;
       
        
GetProperty(ent2property);
       
        
g_pointblock_next_use[id] = gametime str_to_float(property);
       
        return 
PLUGIN_HANDLED;



Black Rose 09-13-2013 12:52

Re: (native "callfunc_begin_i")
 
g_PM_hFunc was not found in g_PM_hPlugin.
Double check the input of get_plugin() and get_func_id().


All times are GMT -4. The time now is 18:48.

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