Raised This Month: $ Target: $400
 0% 

Index out of Bounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 11-27-2010 , 18:38   Index out of Bounds
Reply With Quote #1

L 11/28/2010 - 121:19: [AMXX] Displaying debug trace (plugin "JailBreak_MainMod_Core.amxx")
L 11/28/2010 - 121:19: [AMXX] Run time error 4: index out of bounds
L 11/28/2010 - 121:19: [AMXX] [0] JailBreak_MainMod_Core.sma::task_ShowDay (line 915)


PHP Code:
public task_ShowDay(id)
{
    if(
get_pcvar_num(p_DayCounter))
    {
        
set_hudmessage(255255255, -1.00.35__4.01.01.0);
        
ShowSyncHudMsg(idg_msgSyncHud"%L^n%L"id"DAY_HUD"g_iDayCounteridg_szDisplayDayName[g_iDayPassed]);
        
        if(
g_iTeam[id] == CS_TEAM_T)
            
client_printc(id"%L %L"id"PREFIX"id"DAY_MSG"g_iDayCounteridg_szDisplayDayName[g_iDayPassed]);
        
        else if(
g_iTeam[id] == CS_TEAM_CT)
            
client_printc(id"%L %L"id"PREFIX"id"DAY_GUARD"g_iDayCounteridg_szDisplayDayName[g_iDayPassed]);
    }
    
    if(
get_pcvar_num(p_CrimeSystem))
    {    
        if(
g_iCrimeName[id] == 0
            
g_iCrimeName[id] = random_num(0g_iCrime-1);
        
        if(
g_iTeam[id] == CS_TEAM_T)
            
client_printc(id"%L %L"id"PREFIX"id"CRIME_MSG"g_sCrime[g_iCrimeName[id]]);
    }


PHP Code:
new const g_szDisplayDayName[7][] =
{
    
"DAY_SUNDAY",
    
"DAY_MONDAY",
    
"DAY_TUESDAY",
    
"DAY_WEDNESDAY",
    
"DAY_THURSDAY",
    
"DAY_FRIDAY",
    
"DAY_SATURDAY"
}; 
__________________
JailBreak Mod with Plugin API ( 90% ) Public

Last edited by shuttle_wave; 11-27-2010 at 18:40.
shuttle_wave is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-27-2010 , 18:43   Re: Index out of Bounds
Reply With Quote #2

Without you telling us which line is 915, we can't help you
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 11-27-2010 , 18:57   Re: Index out of Bounds
Reply With Quote #3

PHP Code:
ShowSyncHudMsg(idg_msgSyncHud"%L^n%L"id"DAY_HUD"g_iDayCounteridg_szDisplayDayName[g_iDayPassed]); 
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-27-2010 , 19:27   Re: Index out of Bounds
Reply With Quote #4

Debug g_iDayPassed and try to understand why it's out of bounds.
__________________
Arkshine is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 12-16-2010 , 22:41   Re: Index out of Bounds
Reply With Quote #5

i dont get why is this index out of bounds.


PHP Code:
if(g_bLr[iKiller] && iVictim != iKiller
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-16-2010 , 22:47   Re: Index out of Bounds
Reply With Quote #6

Quote:
Originally Posted by shuttle_wave View Post
i dont get why is this index out of bounds.


PHP Code:
if(g_bLr[iKiller] && iVictim != iKiller
Either show the whole code or learn how to debug (print the value of "iKiller").
__________________
fysiks is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-16-2010 , 22:50   Re: Index out of Bounds
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
Either show the whole code or learn how to debug (print the value of "iKiller").
__________________
fysiks is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 12-16-2010 , 22:52   Re: Index out of Bounds
Reply With Quote #8

how wound i print value of ikiller?
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 12-16-2010 , 22:55   Re: Index out of Bounds
Reply With Quote #9

Quote:
Originally Posted by shuttle_wave View Post
how wound i print value of ikiller?
client_print
__________________
Hi.
Kreation is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 12-16-2010 , 22:48   Re: Index out of Bounds
Reply With Quote #10

CODE REMOVED.
__________________
JailBreak Mod with Plugin API ( 90% ) Public

Last edited by shuttle_wave; 12-16-2010 at 22:52.
shuttle_wave 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 11:16.


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