[Plugin] GVar Plugin

Quote:
Originally Posted by RaeF
Посмотреть сообщение
at the moment, sa-mp have Gvar, what make yours and sa-mp different?
Numbers. The more SVars there are, the slower they get. The more SVars there are, the closer you get to the maximum, 2000.

Dates! Who was first? GVars! That doesn't make it better. Although, you can't compare them that way now since GVars were first and better still.

Speed, period.

Gvars are 'ID based'.

That doesn't mean you can't switch over to SVars, in fact you'll probably never notice the difference until you try to create a 2001th SVar.
Reply

Hello

I have 3 questions

* What is faster GVar or default array or SVars?
* Is there a risk of data loss from falling plugin?
* The better SVars (arguments)?
Reply

Quote:
Originally Posted by Incognito
Посмотреть сообщение
As for your suggestion: yes, I suppose that could be done pretty easily. JernejL also suggested iteration support to me a while back, but I haven't found the time to see about adding it yet.
It would be great to have this plugin on GitHub too ! Any estimated time for the release ?

Quote:
Originally Posted by Logofero
Посмотреть сообщение
Hello

I have 3 questions

* What is faster GVar or default array or SVars?
* Is there a risk of data loss from falling plugin?
* The better SVars (arguments)?
* Pawn arrays (if this is what you mean with "default array").
* No.
* SVars aren't better (they are slower, they have a small limit, and they are not id-based).
Reply

Any posibility to use SetPVarInt( playerid, "TestValue", Value, ID ); (Something to be able to use the ID in the PVar) ?
Reply

Quote:
Originally Posted by nGen.SoNNy
Посмотреть сообщение
Any posibility to use SetPVarInt( playerid, "TestValue", Value, ID ); (Something to be able to use the ID in the PVar) ?
No, you have to do it like this:
pawn Код:
format( string, 20, "TestValue_%d", ID );
SetPVarInt( playerid, string, Value );
Reply

Thanks
Reply

Hello, excuse me, how to compile this plugin for linux?
Reply

What's the limit for GVARs ?
Reply

Quote:
Originally Posted by nGen.SoNNy
Посмотреть сообщение
What's the limit for GVARs ?
Your RAM.
Reply

Suggestion:
#
1How about deleteing ALL Values of a global variable?
Like dropping the hast map/array list/what ever.
So if a filterscripts stops running it would be possible to just drop the variables from the application.

Reason why:
I came across to create a "bad word" list with a external file which is going to be read on script start and push the whole file content into the global context of the server so I would be able to iterate trough the variable which holds the bad words.
And if i'm going to update this variable while runtime it would be required to drop the whole variable at first.


#2
Just pushing values into a global var
instead of knowing the highest index it would be nice to just push something.
So it's not required to know the latest index.
#2.1
Adding the whole interface of the used variable type...^^


Knolle
Reply

It seems any calls to GVar is crashing my server with a unknown error, I'm not sure what the problem could be. Has anyone experienced similar issues? My code is old and I'm not sure which version of the GVar library it was using but I downloaded the latest one from here.

I run Ubuntu 16.04 64 bit, not sure if it could be a file permissions error (if GVar uses files)??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)