SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 12/07/2016, 06:20 PM   #21
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 102
Reputation: 120
Default Re: ArrayList for PAWN

Yea, you was right, in that version was bug, i update it, now everything is fixed,

Update: 1.0.1
Fixed bugs with Multi-Lists


Download:
https://github.com/Ino42O/PawnArrayList
Ivan_Ino is offline   Reply With Quote
Old 12/07/2016, 06:27 PM   #22
Ivan_Ino
Big Clucker
 
Join Date: Oct 2012
Location: Croatia
Posts: 102
Reputation: 120
Default Re: ArrayList for PAWN

Here is proof with test script:

Code:
//arraylist test

#include <a_samp>
#include <ArrayList>


new 
	ArrayList:Arr1,
	ArrayList:Arr2,
	ArrayList:Arr3;
	

public OnFilterScriptInit()
{
	Arr1 = NewArrayList<INTEGER>(10);
	ArrayList::Add(Arr1, 5);
	ArrayList::Add(Arr1, 55);
	ArrayList::Add(Arr1, 555);
	ArrayList::Add(Arr1, 5555);
	ArrayList::Add(Arr1, 55555);
	ArrayList::Add(Arr1, 555555);
	ArrayList::Add(Arr1, 5555555);
	ArrayList::Add(Arr1, 55555555);

	Arr2 = NewArrayList<FLOAT>(5);
	ArrayList::Add(Arr2, 77.0);
	ArrayList::Add(Arr2, 177.0);
	ArrayList::Add(Arr2, 277.0);
	ArrayList::Add(Arr2, 377.0);
	ArrayList::Add(Arr2, 477.0);

	Arr3 = NewArrayList<INTEGER>(7);
	ArrayList::Add(Arr3, 8);
	ArrayList::Add(Arr3, 88);
	ArrayList::Add(Arr3, 888);
	ArrayList::Add(Arr3, 8888);
	ArrayList::Add(Arr3, 88888);
	ArrayList::Add(Arr3, 888888);
	ArrayList::Add(Arr3, 8888888);


	// Arr 1
	print ("ARR1 _______________");
	for (new i = 0; i < ArrayList::Size(Arr1); i++)
	{
		printf ("Arr1 (%d): Index %d, Value: %d", _:Arr1, i, ArrayList::Get(Arr1, i));
	}

	// Arr 2
	print ("ARR2 _______________");
	for (new i = 0; i < ArrayList::Size(Arr2); i++)
	{
		printf ("Arr2 (%d): Index %d, Value: %f", _:Arr2, i, ArrayList::Get(Arr2, i));
	}

	// Arr 3
	print ("ARR3 _______________");
	for (new i = 0; i < ArrayList::Size(Arr3); i++)
	{
		printf ("Arr3 (%d): Index %d, Value: %d", _:Arr3, i, ArrayList::Get(Arr3, i));
	}
	return 1;
}
Ivan_Ino is offline   Reply With Quote
Old 07/08/2018, 04:26 PM   #23
Sasino97
Banned
 
Join Date: Dec 2010
Location: Soon Banned...
Posts: 1,396
Reputation: 127
Default Re: ArrayList for PAWN

Great job, thanks for this.
Sasino97 is offline   Reply With Quote
Old 07/08/2018, 06:06 PM   #24
BigETI
Banned
 
Join Date: Mar 2010
Location: Germany
Posts: 1,055
Reputation: 359
Default Re: ArrayList for PAWN

Great job, thanks for this.
BigETI is offline   Reply With Quote
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] Vectoral Pawn - STL Data containers for pawn Rancho Plugin Development 69 25/03/2019 11:50 PM
[Tool/Web/Other] PAWN Scanner - Scan PAWN files for information. Slice Tools and Files 10 15/07/2012 07:09 PM
New to pawn, trying to convert some C code to pawn CHC Scripting Help 2 22/06/2012 05:09 AM
[Help With Pawn] Pawn and compiler is not working..... D_Less Client Support 3 09/03/2012 04:49 AM


All times are GMT. The time now is 04:28 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.