AlliedModders

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

Effect 06-02-2010 11:29

native error
 
Quote:

L 06/02/2010 - 18:26:30: [AMXX] Displaying debug trace (plugin "test.amxx")
L 06/02/2010 - 18:26:30: [AMXX] Run time error 10: native error (native "message_begin")
L 06/02/2010 - 18:26:30: [AMXX] [0] test.sma::Ev_CurWeapon (line 582)
PHP Code:

public Ev_CurWeapon(id)
{
    if(!
is_user_alive(id))
        return 
PLUGIN_HANDLED
    
    
if (g_zombie[id])
    {
        new 
weapon read_data(2)
        
        if (
weapon != CSW_KNIFE)
        { 
            
engclient_cmd(id"weapon_knife")
            
set_pev(idpev_viewmodel2ULTRA_HANDS)
            
set_pev(idpev_weaponmodel2"")
        }
        
        
message_begin(MSG_ONEmsg_hideweaponid)
        
write_byte(HIDE_HUD HIDE_FLASH HIDE_HP_HUD HIDE_MONEY)
        
message_end()
    }
    else
    {
        
message_begin(MSG_ONEmsg_hideweaponid)
        
write_byte(HIDE_NONE
        
message_end()
    }
    return 
PLUGIN_CONTINUE


Here, help me.

Arkshine 06-02-2010 11:55

Re: native error
 
Is it really the full error, it sounds like the first line has been cuted.

Effect 06-02-2010 12:52

Re: native error
 
what means cuted ?

Arkshine 06-02-2010 14:08

Re: native error
 
I was meant if you have a line above "[AMXX] Displaying debug trace..."

Effect 06-02-2010 14:42

Re: native error
 
Quote:

L 06/02/2010 - 18:26:30: Plugin called message_begin with an invalid message id (0).
L 06/02/2010 - 18:26:30: [AMXX] Displaying debug trace (plugin "test.amxx")
L 06/02/2010 - 18:26:30: [AMXX] Run time error 10: native error (native "message_begin")
L 06/02/2010 - 18:26:30: [AMXX] [0] text.sma::Ev_CurWeapon (line 582)
You're right, i sorry..:oops:

unnyquee 06-02-2010 14:43

Re: native error
 
Show where you registered the 'msg_hideweapon' variable.

Effect 06-02-2010 23:49

Re: native error
 
Fixed. I missed it:
PHP Code:

msg_hideweapon get_user_msgid("HideWeapon"

in plugin init.


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

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