Raised This Month: $12 Target: $400
 3% 

zp 4.3 fix5a error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ALONZO
Member
Join Date: May 2016
Old 03-12-2017 , 08:15   zp 4.3 fix5a error
Reply With Quote #1

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.
__________________
looking for Experience Scripter
Have Good Skills on scripting
To Build With me My own community
Contact me On Skype : med.bougharriou1


Last edited by ALONZO; 03-12-2017 at 08:19.
ALONZO is offline
Send a message via Skype™ to ALONZO
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-12-2017 , 08:25   Re: zp 4.3 fix5a error
Reply With Quote #2

Add this on the top of the function.
Code:
if( ! ( 1 <= attacker <= g_maxplayers ) ) return HAM_IGNORED;
__________________

Last edited by edon1337; 03-12-2017 at 08:26.
edon1337 is offline
ALONZO
Member
Join Date: May 2016
Old 03-12-2017 , 10:35   Re: zp 4.3 fix5a error
Reply With Quote #3

can you show me how ?
__________________
looking for Experience Scripter
Have Good Skills on scripting
To Build With me My own community
Contact me On Skype : med.bougharriou1

ALONZO is offline
Send a message via Skype™ to ALONZO
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-12-2017 , 10:39   Re: zp 4.3 fix5a error
Reply With Quote #4

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.
__________________
edon1337 is offline
ALONZO
Member
Join Date: May 2016
Old 03-12-2017 , 13:10   Re: zp 4.3 fix5a error
Reply With Quote #5

Quote:
Originally Posted by edon1337 View Post
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)
__________________
looking for Experience Scripter
Have Good Skills on scripting
To Build With me My own community
Contact me On Skype : med.bougharriou1

ALONZO is offline
Send a message via Skype™ to ALONZO
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-12-2017 , 13:32   Re: zp 4.3 fix5a error
Reply With Quote #6

Yes.
__________________
edon1337 is offline
ALONZO
Member
Join Date: May 2016
Old 03-12-2017 , 13:47   Re: zp 4.3 fix5a error
Reply With Quote #7

__________________
looking for Experience Scripter
Have Good Skills on scripting
To Build With me My own community
Contact me On Skype : med.bougharriou1

ALONZO is offline
Send a message via Skype™ to ALONZO
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-12-2017 , 13:53   Re: zp 4.3 fix5a error
Reply With Quote #8

Put
Code:
return HAM_IGNORED;
At the LAST line of the function.
__________________
edon1337 is offline
ALONZO
Member
Join Date: May 2016
Old 03-12-2017 , 14:14   Re: zp 4.3 fix5a error
Reply With Quote #9

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
__________________
looking for Experience Scripter
Have Good Skills on scripting
To Build With me My own community
Contact me On Skype : med.bougharriou1

ALONZO is offline
Send a message via Skype™ to ALONZO
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-12-2017 , 14:32   Re: zp 4.3 fix5a error
Reply With Quote #10

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;
    }
__________________

Last edited by edon1337; 03-12-2017 at 14:32.
edon1337 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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