Server update: 0.3a R8
#41

Quote:
Originally Posted by $ЂЯĢ
Quote:
Originally Posted by Maccer
maybe, varname string must be const?
Not really, it's dynamic, so nothing needs to be constant there.
I said about function param type.
instead
pawn Код:
native SetPVarInt(playerid, varname[], int_value);
native GetPVarInt(playerid, varname[]);
use
pawn Код:
native SetPVarInt(playerid, const varname[], int_value);
native GetPVarInt(playerid, const varname[]);
Reply
#42

This is bug?
pawn Код:
public OnPlayerConnect(playerid)
{
    SetPVarInt(playerid, "id", 7);
    printf("id = %d", GetPVarInt(playerid, "id")); // [00:44:43] id = 7
    SetPVarInt(playerid, "suicides", 8);
    printf("id = %d", GetPVarInt(playerid, "id")); // [00:44:43] id = 8
    return 1;
}
Reply
#43

Quote:
Originally Posted by Maccer
This is bug?
pawn Код:
public OnPlayerConnect(playerid)
{
    SetPVarInt(playerid, "id", 7);
    printf("id = %d", GetPVarInt(playerid, "id")); // [00:44:43] id = 7
    SetPVarInt(playerid, "suicides", 8);
    printf("id = %d", GetPVarInt(playerid, "id")); // [00:44:43] id = 8
    return 1;
}
In second print you need to o "suicides" instead of "id".
Reply
#44

Quote:
Originally Posted by Maccer
This is bug?
Yep. I've got something else to fix also so it looks like I'll be releasing R6 shortly.
Reply
#45

Quote:
Originally Posted by $ЂЯĢ
Quote:
Originally Posted by Maccer
This is bug?
pawn Код:
public OnPlayerConnect(playerid)
{
    SetPVarInt(playerid, "id", 7);
    printf("id = %d", GetPVarInt(playerid, "id")); // [00:44:43] id = 7
    SetPVarInt(playerid, "suicides", 8);
    printf("id = %d", GetPVarInt(playerid, "id")); // [00:44:43] id = 8
    return 1;
}
In second print you need to o "suicides" instead of "id".
You don't understand.. He sets the "id" as 7 and then he prints it by using the printf and GetPVarInt, and then he sets the "suicides" and AGAIN he prints the "id" (which was setted as 7) by using the printf and GetPVarInt but then it shows 8 which is wrong - "suicides" should be 8, and not "id".
Reply
#46

May I request that if you already support PVars, then why not add VVars and OVars? Vehicle Variables and Object Variables? Even Pickups etc? This would allow us to actually store further info about the script onto a plugin and would likely allow us to safe WAY more memory and make the access of the variables way easier, would be alot appreciated.
Reply
#47

Good job on RC5/6!
Reply
#48

Quote:
Originally Posted by [NT
Extremo ]
May I request that if you already support PVars, then why not add VVars and OVars? Vehicle Variables and Object Variables? Even Pickups etc? This would allow us to actually store further info about the script onto a plugin and would likely allow us to safe WAY more memory and make the access of the variables way easier, would be alot appreciated.
Are the PVars limited to MAX_PLAYERS or is there no upper limit on ID's? If there is no upper limit you can just use PVars for vehicles and objects, just make sure you don't have conflicting varnames.

Hmm, another problem is that the variables are reset on a player disconnect... solved by removing the auto-variable clearing? Or creating GVars (generic cross-script variables), rather than a different var system for objects and vehicles.. GVars could be used for everything including "gang"/team systems in gamemodes.
Reply
#49

Hey, thanks for updating the server package so quickly from R5! I really appreciate the hard work you are doing Kye.
Reply
#50

I must say great work. I love the idea of Pvars.
However, why not make it available for all GTA elements (such as pickups, checkpoints, objects, vehicles,etc) instead of just players?
This would mean we could use it for attaching data to everything.

EDIT: Oh I see two people beat me to it.
You probably don't like me comparing SA:MP to MTA, but it has a function called setElementData, which is tremendously easier than giving every element an ID to distinguish them. Function to select all elements by type would also be very useful!

Looking forward to something like this
Reply
#51

may be necessary to create dynamic arrays for any variables. like in this plugin
Reply
#52

Quote:
Originally Posted by Geso
Nope, I'd like it if it would be good after one update
You should respect the Team for doing their work. This mod is FREE after all.. so have patience please.
Reply
#53

woooooooooh kye's on a rampage!
Reply
#54

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by Geso
Nope, I'd like it if it would be good after one update
You should respect the Team for doing their work. This mod is FREE after all.. so have patience please.
Ofcourse i respect the developers, but it's not really something good if you have to make 3 updates in 3 days, cause lots of server-owners will be thinking that there is something wrong all the time and that they can be hacked easily or something, hope you understand that.
Reply
#55

Quote:
Originally Posted by Geso
Ofcourse i respect the developers, but it's not really something good if you have to make 3 updates in 3 days, cause lots of server-owners will be thinking that there is something wrong all the time and that they can be hacked easily or something, hope you understand that.
I do understand, but it's better to have a stable client/server with no bugs, you can't really expect everything in one update.
Like I said, we should be happy that this mod is for free and that we have an update after all.
Reply
#56

Nobody is forcing you to update. R5 was the critical update to stop people crashing your server.

R7 will most likely be the last update for now. It would have been a shame to release the new 'PVar' system and not having it working properly, so I decided to push through a couple of additional updates.
Reply
#57

Quote:
Originally Posted by Kye
Nobody is forcing you to update. R5 was the critical update to stop people crashing your server.

R7 will most likely be the last update for now. It would have been a shame to release the new 'PVar' system and not having it working properly, so I decided to push through a couple of additional updates.
True, but i thought we could do it with R5 for some time, but if i knew that so many bugs would appear, i wouldnt have updated everything, but nobody could know, so its okay
Reply
#58

Building on what Kye posted, those who are complaining about the updates stability should take into consideration the fact that it was not (and still isn't) on the the official downloads page for a reason..

Question: is it more efficient to use DeletePVar("Lorem") instead of SetPVarInt("Lorem",0)?
Reply
#59

Quote:
Originally Posted by xcasio
Question: is it more efficient to use DeletePVar("Lorem") instead of SetPVarInt("Lorem",0)?
If you aren't going to use block "Lorem" anytime soon then you should delete it. But if you only want to set it's value to 0 and you will still be using it then use second option.
Reply
#60

Quote:
Originally Posted by xcasio
Question: is it more efficient to use DeletePVar("Lorem") instead of SetPVarInt("Lorem",0)?
Quote:
Originally Posted by Kye
7) PVars can hold very large strings using dynamically allocated memory.
As they are using memory, i think it would be better to Delete them, because setting them 0, will still keep them into memory
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)