Index out of bounds
So I have got a menu and prices for it and in handler i remove amout of money required to buy item, but console is showing me an error : Index is out of bounds, how can I cope with it ?
Code:
Code:
|
Re: Index out of bounds
how much items are?
|
Re: Index out of bounds
What is the value of item? IIRC, the New Menu style does not use a Zero based item scale, so you would need to cope with that.
|
Re: Index out of bounds
Yami is right, use str_to_num( g_Cost[ item - 1 ] ).
|
Re: Index out of bounds
Quote:
Quote:
|
Re: Index out of bounds
Quote:
If I press key one, item = 0. g_Cost[ 0 ] = 10000 |
Re: Index out of bounds
Quote:
|
Re: Index out of bounds
Quote:
|
Re: Index out of bounds
Quote:
|
Re: Index out of bounds
This is the only way to know what the true value of item is
Code:
|
| All times are GMT -4. The time now is 15:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.