Raised This Month: $32 Target: $400
 8% 

Solved Copying 2D arrays by natives


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 09-10-2016 , 08:18   Copying 2D arrays by natives
Reply With Quote #1

I have this:
Code:
native void GetMyArray(any thearray[1D_SIZE][2D_SIZE]);

public int Native_GetMyArray(Handle handler, int numParams)
{
	/* set array in native */
}
And this inside the main plugin, and the one I want to copy the array values to:
Code:
any thearray[1D_SIZE][2D_SIZE];
What I want to achieve, is something like that (in a separate plugin):
Code:
public void OnPluginStart()
{
	any thearray[1D_SIZE][2D_SIZE];
	GetMyArray(thearray);
}
How could I copy the whole array with a native? Would I have to do separate calls per each 1D cell?
__________________
retired

Last edited by shavit; 09-10-2016 at 11:40.
shavit is offline
 


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 02:11.


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