Raised This Month: $ Target: $400
 0% 

Array Sizes do not match


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
_Master_
Senior Member
Join Date: Dec 2006
Old 06-05-2007 , 20:07   Re: Array Sizes do not match
Reply With Quote #8

1) Verry sloppy for loop
2) Why did you do this
PHP Code:
new origin[33][3]; 
if you only use it to pass a single origin as a function call ?
3) The root of the problem is in here
PHP Code:
public FS_Should_Burn_Victim origin[], burnvec1[], burnvec2[], radiusiidff 

    if ( ( 
is_user_alive ) == ) && ( != id ) ) 
    { 
        if ( ( 
get_distance origin[i], burnvec1 ) < radius ) || ( get_distance origin[i], burnvec2 ) < radius ) ) 
        { 
            
TASK_Burn_Victim iidff ); 
        } 
    } 

Inside that function the "origin" variable is that from the argument line, NOT that one declared in your other function (where it was declared as private btw). You cannot do origin[i] here. Taking this a step forward: get_distance() expects 2 vectors like vec1[3] and vec2[3]; origin[i] is interpreted as origin[i][0], origin[i][1] and origin[i][2] (2D arrays). At this poin it conflicts with the local function argument origin[] (1D array). Review point 1 and 2 and your problem will get solved by itself.

Last edited by _Master_; 06-05-2007 at 20:13.
_Master_ is offline
 



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:41.


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