Raised This Month: $ Target: $400
 0% 

Array Invalid (Bug Perhaps)?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 01-23-2007 , 11:54   Array Invalid (Bug Perhaps)?
Reply With Quote #1

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]
__________________


Last edited by mysticssjgoku4; 01-23-2007 at 12:17.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
 


Thread Tools
Display Modes

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 22:24.


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