Raised This Month: $ Target: $400
 0% 

[SOLVED] get_players error "index out of bound"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 05-01-2012 , 09:38   [SOLVED] get_players error "index out of bound"
Reply With Quote #1

How do i fix this error?
Code:
L 05/01/2012 - 18:14:29: Start of error session.
L 05/01/2012 - 18:14:29: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20120501.log")
L 05/01/2012 - 18:14:29: [AMXX] Displaying debug trace (plugin "DeathTeleport.amxx")
L 05/01/2012 - 18:14:29: [AMXX] Run time error 4: index out of bounds 
L 05/01/2012 - 18:14:29: [AMXX]    [0] DeathTeleport.sma::StartTeleport (line 36)
PHP Code:
public StartTeleport(id)
{
    if(!
is_user_alive(id)) return PLUGIN_HANDLED;
    
    new 
iPlayers[32], iNumiRandomPlayerFloat:origin[3]
    switch(
fm_cs_get_user_team(id))
    {
        case 
TEAM_CTget_players(iPlayersiNum"ae""TERRORIST");
        case 
TEAM_TERRORISTget_players(iPlayersiNum"ae""CT");
    }
    
    
iRandomPlayer iPlayers[random(iNum)] //line 36 is here
    
if(!iRandomPlayer) return PLUGIN_HANDLED;
    
    
pev(iRandomPlayerpev_originorigin)
    
origin[2] += 80.0
    set_pev
(idpev_originorigin)
    
set_task(0.2"DelayCheckStuck"id+TASK_CHECK)
    
    return 
PLUGIN_HANDLED;

__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019

Last edited by yokomo; 05-01-2012 at 11:10. Reason: Error has been fixed by Exolent[jNr]
yokomo is offline
 



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 07:45.


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