Which is better
#1

Ok got a gamemode, with a series of filterscripts.

User data is used by each filterscript, and this is saved using the dUser system

Have suspicsion that some lag is caused by mass file access, and also suspect some data errors, caused by same sort of issue.


Two different ways of doing same thing
Quote:
Originally Posted by Method 1
dUserSetINT(PlayerName(playerid)).("Dosh", dUserINT(PlayerName(playerid)).("Dosh") + giveamount);
Quote:
Originally Posted by Method 2
playermoney = dUserINT(PlayerName(playerid)).("Dosh2");
dUserSetINT(PlayerName(playerid)).("Dosh", playermoney+ giveamount);
Now I have a suspicision that the second might be a little easier on file access as its not double accessing in same command, but am I right in this thought??

Problem is this particular piece of data is critical and is accessed every time a user spends or gains money (yes I know about on screen money, this is all about reducing a chance of a hack as if the screen and file values done match..
Reply


Messages In This Thread
Which is better - by CBFASI - 08.04.2009, 20:27
Re: Which is better - by Weirdosport - 08.04.2009, 21:34
Re: Which is better - by Pyrokid - 08.04.2009, 22:43
Re: Which is better - by CBFASI - 09.04.2009, 11:03
Re: Which is better - by Weirdosport - 09.04.2009, 11:07

Forum Jump:


Users browsing this thread: 1 Guest(s)