View Single Post
Author Message
AnimalMonster
Senior Member
Join Date: May 2020
Old 08-01-2020 , 15:43   Run time error 4: index out of bounds
Reply With Quote #1

PHP Code:
public hud(id)
{
    new 
cooldown countdown[id] + 1
    
new cooldown1 countdown1[id] + 1

    
if(cooldown == 0)
    {
        
set_hudmessage(12725585, -1.00.8306.00.9)
        
show_hudmessage(id"[Berserk - Ready] [G]")
        
ready[id] = 1
    
}
    else {
        
set_hudmessage(12725585, -1.00.8306.00.9)
        
show_hudmessage(id"[Berserk - %d] [G]",countdown[id] + 1)
    }
    
    if(
cooldown1 == 0)
    {
        
set_hudmessage(12725585, -1.00.8306.00.9)
        
show_hudmessage(id"^n[Reproduce - Ready] [R]")
        
ready1[id] = 1
    
}
    else {
        
set_hudmessage(12725585, -1.00.8306.00.9)
        
show_hudmessage(id"^n[Reproduce - %d] [R]",countdown1[id] + 1)
    }
    if(
cooldown == 10)
    {
        new 
fovn 110
        fm_set_rendering
(idkRenderFxGlowShell,255,0,0,kRenderNormal,20)
        
set_pev(id,pev_fovfovn)
        
set_pev(id,pev_speedspeed)
        
emit_sound(id,CHAN_VOICE,ability1end,1.0,ATTN_NORM,0,PITCH_NORM)
    }

Why do i get run time error 4: index out of bounds here?:
PHP Code:
if(cooldown == 0
AnimalMonster is offline