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

Run time error 4: index out of bounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RAW_192
Senior Member
Join Date: Feb 2017
Old 02-19-2017 , 10:18   Run time error 4: index out of bounds
Reply With Quote #1

Can someone solve this ?

PHP Code:
 
public Ham_CBasePlayer_TakeDamage_Pre( const id, const iInflictor, const iAttacker, const Float:flDamage, const iDamageType )
{
    if ( ! 
is_user_vip iAttacker ) )  // Line 283
    
{
        
hk_IsUserVipiAttacker ] = 0;
        return 
HAM_IGNORED;
    }
    
hk_IsUserVipiAttacker ] = 1;
   
    new 
dmg1 get_pcvar_num(cvardmg)
   
    if( 
iDamageType == DMG_FALL )
    
SetHamParamFloat(4flDamage*1)
    else
    
SetHamParamFloat(4flDamage*dmg1)
   
    return 
HAM_IGNORED

I get this error in the line
Quote:
L 02/19/2017 - 09:41:06: [AMXX] Run time error 4: index out of bounds
L 02/19/2017 - 09:41:06: [AMXX] [0] NEWVIP.sma::Ham_CBasePlayer_TakeDamage_Pre (line 283)
while this plugin is running and it crashes the server

Last edited by RAW_192; 02-19-2017 at 10:20.
RAW_192 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-19-2017 , 10:53   Re: Run time error 4: index out of bounds
Reply With Quote #2

Code:
if(!is_user_connected(iAttacker))     return HAM_IGNORED

Add this in the beginning of the function.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
RAW_192
Senior Member
Join Date: Feb 2017
Old 02-19-2017 , 11:56   Re: Run time error 4: index out of bounds
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Code:
if(!is_user_connected(iAttacker))     return HAM_IGNORED

Add this in the beginning of the function.
Hey thanks issue is solved thanks alot

I have one more issue can you help me out with that too?

My server is running jctf with latest orpheu module nd hlds

but im getting this error
Quote:
L 02/19/2017 - 11:51:52: [ORPHEU] Function "InstallGameRules" not found
L 02/19/2017 - 11:51:52: [AMXX] Displaying debug trace (plugin "jctf.amxx", version "unknown")
L 02/19/2017 - 11:51:52: [AMXX] Run time error 10: native error (native "OrpheuGetFunction")
L 02/19/2017 - 11:51:52: [AMXX] [0] jctf.sma::game_blockConditions (line 1196)
L 02/19/2017 - 11:51:53: [ORPHEU] Function "CHalfLifeMultiplay::CheckMapConditions" not found
L 02/19/2017 - 11:51:53: [AMXX] Displaying debug trace (plugin "jctf.amxx", version "unknown")
L 02/19/2017 - 11:51:53: [AMXX] Run time error 10: native error (native "OrpheuGetFunction")
L 02/19/2017 - 11:51:53: [AMXX] [0] jctf.sma::game_blockConditions (line 1501)
L 02/19/2017 - 11:51:53: [AMXX] [1] jctf.sma::game_blockConditions (line 1489)

PHP Code:
OrpheuRegisterHook(OrpheuGetFunction("InstallGameRules"), "game_onInstallGameRules"OrpheuHookPost// Line 1196


g_oMapConditions OrpheuRegisterHook(OrpheuGetFunction("CheckMapConditions""CHalfLifeMultiplay"), "game_blockConditions"// Line 1501

#if FEATURE_ORPHEU == true
    
g_bLinux bool:is_linux_server()

    
state disabled

    game_enableForwards
() // Line 1489
#endif // FEATURE_ORPHEU


Last edited by RAW_192; 02-19-2017 at 12:00.
RAW_192 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-19-2017 , 13:09   Re: Run time error 4: index out of bounds
Reply With Quote #4

I can't.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-19-2017 , 13:53   Re: Run time error 4: index out of bounds
Reply With Quote #5

Write version in server console and post the output.
Upload here the signatures that are causing troubles.
__________________
HamletEagle is offline
RAW_192
Senior Member
Join Date: Feb 2017
Old 02-19-2017 , 14:40   Re: Run time error 4: index out of bounds
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
Write version in server console and post the output.
Upload here the signatures that are causing troubles.
It shows this

Quote:
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 17:45:07 Apr 25 2013 (6027)
RAW_192 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-19-2017 , 15:33   Re: Run time error 4: index out of bounds
Reply With Quote #7

Quote:
Upload here the signatures that are causing troubles.
You will find them in addons/configs/orpheu.
__________________

Last edited by HamletEagle; 02-19-2017 at 15:33.
HamletEagle is offline
RAW_192
Senior Member
Join Date: Feb 2017
Old 02-19-2017 , 23:42   Re: Run time error 4: index out of bounds
Reply With Quote #8

Quote:
Originally Posted by HamletEagle View Post
You will find them in addons/configs/orpheu.
PHP Code:
{
    
"name"    "InstallGameRules",
    
"library" "mod",
    
"return"  
    {
        
"type" "CHalfLifeMultiplay *"
    
},
    
"identifiers":
    [
        {
            
"os"    "windows",
            
"mod"   "cstrike",
            
"value" : [0x68,"*","*","*","*",0xFF,"*","*","*","*","*",0x83,0xC4,0x4,0xFF,"*","*","*","*","*",0xA1,"*","*","*","*",0xD9,0x40,0x14],
            
"info"  "Works for Condition Zero"
        
},
        {
            
"os"    "linux",
            
"mod"   "cstrike",
            
"value" "InstallGameRules__Fv"
        
},
        {
            
"os"    "windows",
            
"mod"   "SvenCoop",
            
"value" : [0x55,0x8B,0xEC,0x6A,0xFF,0x68,"*","*","*","*",0x64,"*","*","*","*","*",0x50,0x81,"*","*","*","*","*",0xA1,"*","*","*","*",0x33,0xC5,0x89,0x45,0xF0]
        },
        {
            
"os"    "windows",
            
"mod"   "ns",
            
"value" : [0x6A,0xFF,0x68,"*","*","*","*",0x64,"*","*","*","*","*",0x50,0x64,"*","*","*","*","*","*",0x51,0x68]
        },
        {
            
"os"    "linux",
            
"mod"   "ns",
            
"value" "_Z16InstallGameRulesv"
        
},
        {
            
"os"    "windows",
            
"mod"   "dod",
            
"value" : [0x55,0x8B,0xEC,0x83,0xEC,0x48,0x53,0x56,0x57,0x68,"*","*","*","*",0xFF,"*","*","*","*","*",0x83,0xC4,0x04,0xFF]
        },
        {
            
"os"    "linux",
            
"mod"   "dod",
            
"value" "InstallGameRules__Fv"
        
},
        {
            
"os"    "windows",
            
"mod"   "valve",
            
"value" : [0x68,"*","*","*","*",0xFF,"*","*","*","*","*",0x83,0xC4,0x04,0xFF,"*","*","*","*","*",0x8B]
        },
        {
            
"os"    "linux",
            
"mod"   "valve",
            
"value" "InstallGameRules__Fv"
        
},
        {
            
"os"    "windows",
            
"mod"   "ts",
            
"value" : [0x6A,0xFF,0x68,"*","*","*","*",0x64,"*","*","*","*","*",0x50,0x64,"*","*","*","*","*","*",0x51,0x56,0x68]
        },
        {
            
"os"    "linux",
            
"mod"   "ts",
            
"value" "InstallGameRules__Fv"
        
}         
    ]

PHP Code:
{
    
"name"    "CheckMapConditions",
    
"class"   "CHalfLifeMultiplay",
    
"library" "mod",
    
"return"  :
    {
        
"type" "bool"
    
},
    
"identifiers" 
    [
        {
            
"os"    "windows",
            
"mod"   "cstrike",
            
"value" : [0x53,0x56,0x33,0xDB,0x68,"*",0x39,"*","*",0x8B,0xF1,0x53,0xE8,"*","*",0x03,0x00,0x83,0xC4,0x08,0x85,0xC0,0x74,0x0A,0xC6,0x46,0x7E,0x01,0xC6,0x46,0x7F,0x01,0xEB,0x1E]
        },
        {
            
"os"    "linux",
            
"mod"   "cstrike",
            
"value" "CheckMapConditions__18CHalfLifeMultiplay"
        
}
    ]

RAW_192 is offline
Old 02-20-2017, 11:09
RAW_192
This message has been deleted by HamletEagle. Reason: Wait 14 days before bumping. I'm busy, will reply when I can.
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-24-2017 , 13:16   Re: Run time error 4: index out of bounds
Reply With Quote #9

here :
Attached Files
File Type: zip CheckMapConditions.zip (421 Bytes, 30 views)

Last edited by yas17sin; 02-24-2017 at 13:56.
yas17sin is offline
Send a message via ICQ to yas17sin
Reply



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 02:39.


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