View Single Post
  #8  
Old 02-24-2015, 03:23 PM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
Quote:
Originally Posted by cbk1994 View Post
Imagine you wish to find a list of all players in a certain guild. If you store the guild as a clientr variable (like clientr.guild=Vimes), then if you wanted to list all players in Vimes, you need to search every player who has ever logged on to the server. (This is impractically slow for most uses.)

If you store it in a text file or DB NPC, you could instead store an array guild.Vimes=cbk1994,Seeya and easily get that list.



You could, but beware problems which might result in inconsistent data between the two. Imagine you open a player's attributes via RC, they join a guild, then you save their attibutes. The DB NPC will have been updated, but not the player flags. Having a single source of data helps to keep things consistent and prevent subtle bugs.
Ah, I think I understand that. Thanks everyone
Reply With Quote