Code:
//Get Item Information in TABLE
new i_sizes[2]
get_max_item_str_func(id,i_sizes)
new total_items = i_sizes[0]
new max_item_str = i_sizes[1]+10
new Items[1][max_item_str]
The compiler reads the
Code:
new Items[1][max_item_str]
as an invalid array size.
Also says
Code:
new Items[1][max_item_str+10]
is an invalid array size.
Now I understand why this is occuring, because there is a possibility of a negetive value being the array size, but is there an alternative to achiving this?
I'm sick at home today, so may be I'm just not thinking clear enough to figure this out on my own right now.
Thanks in advance.
--------------
Aye....even tried absolute value...this is somewhat of an annoynce.
Code:
new total_items = i_sizes[0]
new max_item_str = abs(i_sizes[1])
new Items[1][max_item_str+10]
How the hell does it assume zero when it's the absolute value +10? :S
Bug perhaps?
---------------------------------
Even tried const variable + 10....
Code:
new total_items = i_sizes[0]
new const max_item_str = abs(i_sizes[1])+10
new Items[1][max_item_str]
__________________