AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   zp 4.3 fix5a error (https://forums.alliedmods.net/showthread.php?t=294962)

ALONZO 03-12-2017 08:15

zp 4.3 fix5a error
 
Quote:

L 03/11/2017 - 22:20:47: [AMXX] Displaying debug trace (plugin "zombie_plague.amxx")

L 03/11/2017 - 22:20:47: [AMXX] Run time error 4: index out of bounds

L 03/11/2017 - 22:20:47: [AMXX] [0] zombie_escape.sma::fw_PlayerKilled (line 2363)


here is line 2363
Quote:

if ((g_nemesis[attacker] || g_nemesis[victim]) || (g_assassin[attacker] || g_assassin[victim]))
i use zp 4.3 fix5a by bakir

Hope someone help.

edon1337 03-12-2017 08:25

Re: zp 4.3 fix5a error
 
Add this on the top of the function.
Code:
if( ! ( 1 <= attacker <= g_maxplayers ) ) return HAM_IGNORED;

ALONZO 03-12-2017 10:35

Re: zp 4.3 fix5a error
 
can you show me how ?

edon1337 03-12-2017 10:39

Re: zp 4.3 fix5a error
 
If you're that dumb to not even know how to add 2 lines of code in a function then you don't deserve a server.

ALONZO 03-12-2017 13:10

Re: zp 4.3 fix5a error
 
Quote:

Originally Posted by edon1337 (Post 2503024)
If you're that dumb to not even know how to add 2 lines of code in a function then you don't deserve a server.

it became like that ?
Code:

        // Nemesis/Assassins explodes!
        if( ! ( 1 <= attacker <= g_maxplayers ) )
                    return HAM_IGNORED;
        if ((g_nemesis[attacker] || g_nemesis[victim]) || (g_assassin[attacker] || g_assassin[victim]))                               
                SetHamParamInteger(3, 2)


edon1337 03-12-2017 13:32

Re: zp 4.3 fix5a error
 
Yes.

ALONZO 03-12-2017 13:47

Re: zp 4.3 fix5a error
 
http://i.imgur.com/g3PQmT2.png

edon1337 03-12-2017 13:53

Re: zp 4.3 fix5a error
 
Put
Code:
return HAM_IGNORED;
At the LAST line of the function.

ALONZO 03-12-2017 14:14

Re: zp 4.3 fix5a error
 
Like this ?
Quote:

// Nemesis/Assassins explodes!
if( ! ( 1 <= attacker <= g_maxplayers ) )
if ((g_nemesis[attacker] || g_nemesis[victim]) || (g_assassin[attacker] || g_assassin[victim]))
SetHamParamInteger(3, 2)
return HAM_IGNORED;
Here is errors
http://i.imgur.com/Th0aMc7.png

edon1337 03-12-2017 14:32

Re: zp 4.3 fix5a error
 
Do you know what a function is?

I told you to put the return at the END of the function not after SetHamParamInteger.

Code:
public fw_HamKilled(victim, attacker, shouldgib) {         // Nemesis/Assassins explodes!     if( ! ( 1 <= attacker <= g_maxplayers ) )     return HAM_IGNORED;     if ((g_nemesis[attacker] || g_nemesis[victim]) || (g_assassin[attacker] || g_assassin[victim]))                       SetHamParamInteger(3, 2)         // other code         // other code         // other code    
    return HAM_IGNORED;
    }


All times are GMT -4. The time now is 02:51.

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