Advertisement
Guest User

Untitled

a guest
Jul 1st, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.28 KB | None | 0 0
  1.         public static string B64E(string ix)
  2.         {
  3.             byte[] earray = System.Text.Encoding.UTF8.GetBytes(ix);
  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) - 1;
  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) - 1;
  17.             string charname = Console.ReadLine();
  18.             string[] miscvalue = new string[50];
  19.             miscvalue[0] = savename;
  20.             miscvalue[1] = charname;
  21.             miscvalue[2] = "0";
  22.             miscvalue[3] = "10";
  23.             miscvalue[4] = "1";
  24.             int itcount = 0;
  25.             foreach (string item in miscvalue)
  26.             {
  27.                 string pltext = function.B64E(item);
  28.                 miscvalue[itcount] = pltext;
  29.                 itcount =+ 1;
  30.             }
  31.             Console.WriteLine(miscvalue);
  32.             Console.ReadKey(true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement