View Single Post
Go4Expert Member
30Aug2011,05:40  
Brentatechnologies's Avatar
Hey All,

I recently as said in my introduction became interested in coding my own RSPS, I'm using Project Insanity Source code and Client, and I was adding in a command for a ::trusted, which builds a list of trusted players....

This is the code im using but I'm thinking that it's wrong somehow, can someone please read over it and add suggestions

Code:
/**
 * Writes the username into a text file - use ::trusted username
 **/
 public static void addUsernameToFile(String Name) {
  try {
   BufferedWriter out = new BufferedWriter(new FileWriter("./Data/trusted/TrustedPlayers.txt", true));
  try {
    out.newLine();
    out.Write(Name);
   } finally {
    out.close();
  } catch (IOException e) {
   e.printStackTrace();
  }
 }

Last edited by shabbir; 30Aug2011 at 10:21.. Reason: Code blocks