Advertisement
Guest User

Untitled

a guest
Jul 1st, 2017
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.31 KB | None | 0 0
  1.         public static string B64E(string text)
  2.         {
  3.             byte[] earray = System.Text.Encoding.UTF8.GetBytes(text);
  4.             return Convert.ToBase64String(earray);
  5.         }
  6.         static public void CreateSave()
  7.         {
  8.             function.WriteCenter("Enter name of new save");
  9.             Console.WriteLine("\n\n");
  10.             Console.CursorLeft = (Console.WindowWidth / 2) - 3;
  11.             string savename = Console.ReadLine();
  12.             Directory.CreateDirectory(@"saves\" + savename);
  13.             Console.WriteLine("\n");
  14.             function.WriteCenter("Enter charcter name");
  15.             Console.WriteLine("\n\n");
  16.             Console.CursorLeft = (Console.WindowWidth / 2) - 3;
  17.             string charname = Console.ReadLine();
  18.             string[] miscvalue = new string[7];
  19.             miscvalue[0] = "empty";
  20.             miscvalue[1] = "empty";
  21.             miscvalue[2] = savename;
  22.             miscvalue[3] = charname;
  23.             miscvalue[4] = "0";
  24.             miscvalue[5] = "10";
  25.             miscvalue[6] = "1";
  26.             int icount = 0;
  27.             foreach (string item in miscvalue)
  28.             {
  29.                 miscvalue[icount] = function.B64E(item);
  30.                 icount =+ 1;
  31.             }
  32.             Console.WriteLine(miscvalue[3]);
  33.             Console.ReadKey();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement