Raised This Month: $ Target: $400
 0% 

Index out of bounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 08-15-2013 , 10:37   Re: Index out of bounds
Reply With Quote #1

Quote:
Originally Posted by Backstabnoob View Post
Yami is right, use str_to_num( g_Cost[ item - 1 ] ).
No.
If I press key one, item = 0.
g_Cost[ 0 ] = 10000
guipatinador is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 08-15-2013 , 10:41   Re: Index out of bounds
Reply With Quote #2

Quote:
Originally Posted by guipatinador View Post
No.
If I press key one, item = 0.
g_Cost[ 0 ] = 10000
Yes thats what I am talking about. This error occurs when u press 0. Aka Exit!
Podarok is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-15-2013 , 10:43   Re: Index out of bounds
Reply With Quote #3

Quote:
Originally Posted by Podarok View Post
Yes thats what I am talking about. This error occurs when u press 0. Aka Exit!
No it doesn't. You have caught the MENU_EXIT. If you believe it is the other way, then DEBUG it
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 08-15-2013 , 14:46   Re: Index out of bounds
Reply With Quote #4

Quote:
Originally Posted by YamiKaitou View Post
No it doesn't. You have caught the MENU_EXIT. If you believe it is the other way, then DEBUG it
I opened 2 windows, CS and My Remote Connection to the server i pressed every key on the menu and only when I pressed 0 aka Exit this error occured.. I was also wondered why because as u said i have caught the MENU_EXIT ? Maybe I should do it like this : if(item == -1)... ?
Podarok 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 15:55.


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