SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 26/10/2014, 04:29 PM   #61
Mauzen
Godfather
 
Mauzen's Avatar
 
Join Date: Jun 2007
Location: Western Germany
Posts: 5,130
Reputation: 1556
Default Re: Vectoral Pawn - STL Data containers for pawn

Quote:
Originally Posted by Finn View Post
Stupid question: how to delete the vector?

cvector_clear(vectorid) seems to only clear the vector, because after gmx the vector still exists or am I doing something wrong?
Yep, seems like the plugin doesnt support that. Deallocation possibilities are limited even in c++ itself. Not sure how exactly they work and how their memory is managed.

Quote:
Originally Posted by Banditukas View Post
Where this i can use?
Its like arrays with dynamic sizes. You can use them whereever you want to store something but cant predict how big it is gonna be.
Mauzen is offline   Reply With Quote
Old 26/10/2014, 04:32 PM   #62
iZN
High-roller
 
Join Date: Jun 2010
Posts: 2,451
Reputation: 569
Default Re: Vectoral Pawn - STL Data containers for pawn

Quote:
Originally Posted by Finn View Post
Stupid question: how to delete the vector?

cvector_clear(vectorid) seems to only clear the vector, because after gmx the vector still exists or am I doing something wrong?
Code:
native cvector_remove(vectorid, itemid, end_itemid = -1);

You can remove the vector through any specific vector ID. I've actually used Teprey's CSTL plugin, not this plugin, and I was having vector_remove, which should work just like that.
__________________
iZN is offline   Reply With Quote
Old 27/10/2014, 09:22 AM   #63
Banditukas
Gangsta
 
Join Date: Jul 2014
Posts: 535
Reputation: 1
Default Re: Vectoral Pawn - STL Data containers for pawn

Maybe can give examples?
Banditukas is offline   Reply With Quote
Old 06/11/2014, 06:02 PM   #64
Banditukas
Gangsta
 
Join Date: Jul 2014
Posts: 535
Reputation: 1
Default Re: Vectoral Pawn - STL Data containers for pawn

show my example with array big size use.
Banditukas is offline   Reply With Quote
Old 28/02/2015, 05:50 PM   #65
ShooteR1990
Little Clucker
 
ShooteR1990's Avatar
 
Join Date: Aug 2012
Location: Russia
Posts: 42
Reputation: 0
Exclamation Re: Vectoral Pawn - STL Data containers for pawn

Plugin didn't work in sa-mp 0.3.7 RC1.
Code:
SA-MP Dedicated Server
----------------------
v0.3.7-RC1, (C)2005-2015 SA-MP Team

[21:22:07] filterscripts = ""  (string)
[21:22:07] weburl = "www.sa-mp.com"  (string)
[28/02/2015 21:22:07] 
[28/02/2015 21:22:07] Server Plugins
[28/02/2015 21:22:07] --------------
[28/02/2015 21:22:07]  Loading plugin: CVector
[28/02/2015 21:22:07]   Failed.
[28/02/2015 21:22:07]  Loaded 0 plugins.

[28/02/2015 21:22:07] 
[28/02/2015 21:22:07] Filterscripts
[28/02/2015 21:22:07] ---------------
[28/02/2015 21:22:07]   Loaded 0 filterscripts.
__________________
Best wishes, ShooteR1990
Play in SA:MP since 2009 / Pawn scripting since 2010
Do not pm me.
ShooteR1990 is offline   Reply With Quote
Old 28/02/2015, 06:13 PM   #66
MicroD
Gangsta
 
Join Date: Sep 2010
Posts: 537
Reputation: 24
Default Re: Vectoral Pawn - STL Data containers for pawn

Use the other one then, it works on 0.3.7 I tested.
MicroD is offline   Reply With Quote
Old 28/02/2015, 07:19 PM   #67
Golf
Gangsta
 
Join Date: Jun 2014
Location: DZ
Posts: 524
Reputation: 47
Default Re: Vectoral Pawn - STL Data containers for pawn

sample script needed ^^
__________________
Golf is offline   Reply With Quote
Old 05/03/2015, 05:21 PM   #68
Akmet
Little Clucker
 
Join Date: Feb 2009
Posts: 45
Reputation: 0
Default AW: Vectoral Pawn - STL Data containers for pawn

Hey!

I noticed the plugin does not free the memory after deleting elements out of multimaps. Is anyone actually using this plugin? Does anyone else noticed it?

When adding eg. 5000 elements to one key, clear the multimap und reinsert 5000 elements the time needed to add everything explores from around 8sec to 26-27sec.

Can anyone help me or has an idee?

about me: i am not a c++ expert, but i am able to use and understand some keywords
Akmet is offline   Reply With Quote
Old 07/03/2015, 05:57 PM   #69
Rancho
Big Clucker
 
Join Date: Jun 2012
Posts: 88
Reputation: 59
Default Re: Vectoral Pawn - STL Data containers for pawn

Quote:
Originally Posted by Finn View Post
Stupid question: how to delete the vector?

cvector_clear(vectorid) seems to only clear the vector, because after gmx the vector still exists or am I doing something wrong?
It have to be deleted when the '.amx' unloads.

@Akmet: I'll solve this issue. Sorry about that.
Rancho is offline   Reply With Quote
Old 03/05/2017, 06:40 PM   #70
ShooteR1990
Little Clucker
 
ShooteR1990's Avatar
 
Join Date: Aug 2012
Location: Russia
Posts: 42
Reputation: 0
Default Re: Vectoral Pawn - STL Data containers for pawn

Sorry for Bump, but I need fix for delete vectors. If Autor of this plugin is still here, please answer.
__________________
Best wishes, ShooteR1990
Play in SA:MP since 2009 / Pawn scripting since 2010
Do not pm me.
ShooteR1990 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
[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
[HELP] [pawn][/pawn] bbcode for phpbb3 Kasura Help Archive 4 20/11/2010 04:35 AM


All times are GMT. The time now is 07:17 PM.


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