08.04.2009, 20:27
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
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..
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); |
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..