Raised This Month: $ Target: $400
 0% 

Index out of bound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edgaras85
Senior Member
Join Date: Mar 2010
Location: Lithuania
Old 10-19-2010 , 07:14   Index out of bound
Reply With Quote #1

PHP Code:
public join_team(id
{
        if (
get_user_flags(id) & ( ADMIN_KICK ADMIN_LEVEL_A )) 
    {
        
remove_task(id)
        return 
PLUGIN_CONTINUE
    
}
    
        new 
arg[2
        
read_argv(1arg1)
        [
code]if (blockjoining[str_to_num(arg)-1] == true)[/code]        {
                
engclient_cmd(id"chooseteam"
                return 
PLUGIN_HANDLED 
        

    
        return 
PLUGIN_CONTINUE 

in code Is 161 line

Quote:
L 10/16/2010 - 111:12: [AMXX] Displaying debug trace (plugin "teamlocker.amxx")
L 10/16/2010 - 111:12: [AMXX] Run time error 4: index out of bounds
L 10/16/2010 - 111:12: [AMXX] [0] teamlocker.sma::join_team (line 161)
__________________

Last edited by edgaras85; 10-19-2010 at 07:16.
edgaras85 is offline
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 10-19-2010 , 09:01   Re: Index out of bound
Reply With Quote #2

It would help a bit if you'd tell what is the 161 line .
__________________
Voi is offline
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-19-2010 , 09:25   Re: Index out of bound
Reply With Quote #3

post ur complete code if u want help
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
edgaras85
Senior Member
Join Date: Mar 2010
Location: Lithuania
Old 10-19-2010 , 11:52   Re: Index out of bound
Reply With Quote #4

PHP Code:
if (blockjoining[str_to_num(arg)-1] == true) { 
is 161 line

Quote:
post ur complete code if u want help
Its full function
__________________
edgaras85 is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 10-19-2010 , 11:55   Re: Index out of bound
Reply With Quote #5

wich is the line 161?
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
edgaras85
Senior Member
Join Date: Mar 2010
Location: Lithuania
Old 10-19-2010 , 12:08   Re: Index out of bound
Reply With Quote #6

Quote:
Originally Posted by mottzi View Post
wich is the line 161?
I wrote in post above yours....

PHP Code:
if (blockjoining[str_to_num(arg)-1] == true
__________________
edgaras85 is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 10-19-2010 , 12:40   Re: Index out of bound
Reply With Quote #7

Just add:

is_user_connected ?
__________________
Retired.
Xalus is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 10-19-2010 , 12:54   Re: Index out of bound
Reply With Quote #8

May be because is ilogical. You have to think that if str_to_num(arg) is 0. The statement would be:
PHP Code:
if (blockjoining[0-1] == true
array[-1] is ilogical.
Mxnn is offline
edgaras85
Senior Member
Join Date: Mar 2010
Location: Lithuania
Old 10-19-2010 , 12:55   Re: Index out of bound
Reply With Quote #9

Quote:
Originally Posted by Xalus View Post
Just add:

is_user_connected ?
Thanks will try

Maybe you know why this error happened?
Quote:
L 10/09/2010 - 12:20:48: [AMXX] Displaying debug trace (plugin "use_button_once.amxx")
L 10/09/2010 - 12:20:48: [AMXX] Run time error 3: stack error
On other plugin Dont want to create other topic
__________________
edgaras85 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-19-2010 , 17:53   Re: Index out of bound
Reply With Quote #10

Quote:
Originally Posted by edgaras85 View Post
Maybe you know why this error happened?


On other plugin Dont want to create other topic
Not enough memory for the plugin, IIRC.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 10:20.


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