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

Solved index out of bounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 11-09-2017 , 02:34   index out of bounds
Reply With Quote #1

i can't find where is the problem?
Thanks

error
Quote:
L 11/09/2017 - 12:494: [AMXX] Displaying debug trace (plugin "deathmatch.amxx", version "unknown")
L 11/09/2017 - 12:494: [AMXX] Run time error 4: index out of bounds
L 11/09/2017 - 12:494: [AMXX] [0] deathmatch.sma::remove_speed (line 431)
PHP Code:
public remove_speed(id)
{
    
id -= TASK_DM_SPEED;
    if(
dm_speed[id])    //error in this line 431
    
{
        
dm_speed[id] = false;
        
set_user_maxspeed(id241.0);
        
remove_task(id+TASK_DM_SPEED);
    }

array size
PHP Code:
new bool:dm_speed[33]
const 
TASK_DM_SPEED 1111
setting speed
PHP Code:
set_user_maxspeed(id,400.0);
dm_speed[id] = true;
set_task(15.0"remove_speed"id+TASK_DM_SPEED); 
client_disconnect
PHP Code:
public client_disconnect(id)
{
   if(
dm_speed[id])
        {
            
dm_speed[id] = false;
            
set_user_maxspeed(id241.0);
        }
remove_task(id+TASK_DM_SPEED);


currweaponevent
PHP Code:
 register_event("CurWeapon""dmOnCurWeaponEvent""be""1=1");
public 
dmOnCurWeaponEvent(id)
{
    if(
is_user_alive(id))
    {
        if( 
dm_speed[id])
            
set_user_maxspeed(id400.0);
    }


Last edited by indraraj striker; 11-09-2017 at 02:45.
indraraj striker is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 11-09-2017 , 02:45   Re: index out of bounds
Reply With Quote #2

Sorry to say the issue has been resolved
by mistake the same task was in another public function
#solved
indraraj striker is offline
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 04:19.


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