View Single Post
  #6  
Old 02-24-2015, 05:45 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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.

Quote:
Originally Posted by khortez View Post
But I could use a mixture of different methods? IE: clientr. + DB/textfiles?
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.
__________________
Reply With Quote