Raised This Month: $ Target: $400
 0% 

Dbz mod: index out of bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
JuanitoAlimana
Senior Member
Join Date: Aug 2021
Old 05-14-2024 , 15:39   Dbz mod: index out of bounds
Reply With Quote #1

I'm using this DBZ mod plugin but this line shows "Run time error 4: index out of bounds" from time to time. Sometimes the plugin works but sometimes it doesn't. How can I solve this?

PHP Code:
public client_putinserver(player_id) {

    
get_user_name(player_idg_playername[player_id], charsmax(g_playername[])) // Cache player's name

    
g_is_user_connected[player_id] = true

    g_players_connected
[g_players_count] = player_id /// line 992
        
    
if(!g_players_count)
        
set_task(1.0"iterate_through_players"TASK_LOOP_PLAYERS__"b")

        
g_players_count++
}

public 
iterate_through_players()
{
    static 
player_id
    
static spectator_id
    
    
for(g_current_index 0g_current_index g_players_countg_current_index++) {
        
player_id g_players_connected[g_current_index]
        
        if(
is_user_valid_alive(player_id)) {
            
ShowHUD(player_idplayer_id)
            
dbz_loop(player_id)
        }
        else 
// Player died?
        
{
            
// Get spectator target
            
spectator_id pev(player_idpev_iuser2)
            
            if(
is_user_valid_alive(spectator_id))
                
ShowHUD(player_idspectator_id)
        }
    }

JuanitoAlimana is online now
 



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 03:38.


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