Raised This Month: $ Target: $400
 0% 

Array Sizes do not match


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 06-05-2007 , 18:58   Re: Array Sizes do not match
Reply With Quote #3

The problem is pretty self explanatory.

As regalis said you are not setting origin correctly! For retrieving and setting data it should have origin[id] since it is a 2 dimensional array.

Ideally you should use a declared size for arrays in your function.
1) For error checking if you try going beyond the size
2) So Pawn knows exactly how much memory to allocate.

Code:
public function1(id) {     new pOrigin[3]     get_user_origin(id, pOrigin)     function2(pOrigin) } function2(origin[3]) {     client_print(0, print_chat, "X: %i - Y: %i - Z: %i", origin[0], origin[1], origin[2]) }
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd

Last edited by Orangutanz; 06-05-2007 at 19:04.
Orangutanz 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