AlliedModders

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

NiHiLaNTh 10-04-2009 09:20

Unhandled dynamic native error
 
Help me, I get this kind of error all the time
HTML Code:

L 10/04/2009 - 16:15:20: Unhandled dynamic native error
L 10/04/2009 - 16:15:20: [AMXX] Displaying debug trace (plugin "zclass_cursed.amxx")
L 10/04/2009 - 16:15:20: [AMXX] Run time error 10: native error (native "engfunc")
L 10/04/2009 - 16:15:20: [AMXX]    [0] zclass_cursed.sma::Event_BoomerDeath (line 110)

Here is code part
Code:

public Event_CursedDeath()
{
    //new attacker = read_data(1)
    new victim = read_data(2)
    new Float:radius = get_pcvar_float(cvar_radius)
   
    if (zp_get_user_zombie_class(victim) == g_zclass_cursed)
    {
        if (CanExplode[victim])
        {
            new Float:origin[3]; pev(victim,pev_origin, origin)
       
            new infected = -1
            while((infected = engfunc(EngFunc_FindEntityInSphere, infected, origin, radius)) !=0)
            {
                if (!is_user_alive(infected) ||!is_user_connected(infected))
                    continue
                   
                if (zp_get_user_zombie(infected) || zp_get_user_nemesis(infected))
                    continue
                   
                if (zp_get_user_survivor(infected))
                    continue
                   
                zp_infect_user(infected, victim,0,0)
                //emit_sound(infected, CHAN_WEAPON, "weapons/mortarhit.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
            }
        }
        CanExplode[victim] = false
    }
}

What is wrong with the code?

PS. Can someone tell me why this kind of error is happening?What are the reason of this error?

NiHiLaNTh 10-05-2009 08:41

Re: Unhandled dynamic native error
 
Please, I need your support :/

xPaw 10-05-2009 08:52

Re: Unhandled dynamic native error
 
Where is line 110

NiHiLaNTh 10-05-2009 08:57

Re: Unhandled dynamic native error
 
Code:

zp_infect_user(infected, victim,0,0)

Exolent[jNr] 10-05-2009 09:00

Re: Unhandled dynamic native error
 
Next time, do not bump your thread until it has been 2 weeks until last post.

jagged20101 10-06-2009 08:33

Re: Unhandled dynamic native error
 
That line may be conflicting with another line of code in a different part, not always the exact line that it says is the problem.

NiHiLaNTh 10-06-2009 10:29

Re: Unhandled dynamic native error
 
Hmm, I think it couldn't conflict with another part of the code


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

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