Thread: Tips & Tricks
View Single Post
Old 27/01/2011, 11:56 AM   #26
Beta Tester
Y_Less's Avatar
Join Date: Jun 2008
Location: 629 -
Posts: 15,486
Reputation: 3206
Default Re: Tips & Tricks

So you did, it seems a little buried in comments for an important point.

Also, you could sum up my TD point as committing a number of changes to something together, you could do the same for a smart user file system:

pawn Code:
Player_Int(playerid, "score", score);
Player_Float(playerid, "health", health);

The first call detects that the player's file isn't open and opens it, setting a 0ms timer to close it again and commit writes. Subsequent calls simply add to the buffer. You could actually use this to write a drop-in replacement for dini with the simplicity of it's API and the speed of buffered systems.
Y_Less is online now   Reply With Quote