[Fix]QuizShow

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • [Fix]QuizShow

      [FONT="Fixedsys"][COLOR="DarkOrchid"]I hear a lot of people saying how quiz show does not work.
      Well I decided to go through the source and find out what the problem is.
      It's really simple so here it is.
      You're going to go to Database.cs and search for[/COLOR][/FONT]

      Quellcode

      1. public static void LoadQuestions()

      [FONT="Fixedsys"][COLOR="DarkOrchid"]Under that you should see this[/COLOR][/FONT]

      Quellcode

      1. {
      2. {
      3. string[] AllLines = System.IO.File.ReadAllLines("C:\\OldCODB\\QuizShow.txt");
      4. int questionscount = AllLines.Length;
      5. for (int x = 0; x < questionscount; x++)
      6. {
      7. string[] Info = AllLines[x].Split('#');
      8. string Question = Info[0];
      9. Features.QuizShow.Answer[] Answers = new NewestCOServer.Features.QuizShow.Answer[4];
      10. Answers[0] = new NewestCOServer.Features.QuizShow.Answer(Info[1].Split(':')[0], ushort.Parse(Info[1].Split(':')[1]));
      11. Answers[1] = new NewestCOServer.Features.QuizShow.Answer(Info[2].Split(':')[0], ushort.Parse(Info[2].Split(':')[1]));
      12. Answers[2] = new NewestCOServer.Features.QuizShow.Answer(Info[3].Split(':')[0], ushort.Parse(Info[3].Split(':')[1]));
      13. Answers[3] = new NewestCOServer.Features.QuizShow.Answer(Info[4].Split(':')[0], ushort.Parse(Info[4].Split(':')[1]));
      14. Features.QuizShow.Question Q = new NewestCOServer.Features.QuizShow.Question(Question, Answers);
      15. Features.QuizShow.AllQuestions.Add((ushort)x, Q);
      16. }
      17. }
      18. }
      Alles anzeigen

      [FONT="Fixedsys"][COLOR="DarkOrchid"]Replace it with this.[/COLOR][/FONT]

      Quellcode

      1. {
      2. if (File.Exists(@"C:\OldCODB\QuizShow.txt"))
      3. {
      4. string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\QuizShow.txt");
      5. int questionscount = AllLines.Length;
      6. for (int x = 0; x < questionscount; x++)
      7. {
      8. string[] Info = AllLines[x].Split('#');
      9. string Question = Info[0];
      10. Features.QuizShow.Answer[] Answers = new NewestCOServer.Features.QuizShow.Answer[4];
      11. Answers[0] = new NewestCOServer.Features.QuizShow.Answer(Info[1].Split(':')[0], ushort.Parse(Info[1].Split(':')[1]));
      12. Answers[1] = new NewestCOServer.Features.QuizShow.Answer(Info[2].Split(':')[0], ushort.Parse(Info[2].Split(':')[1]));
      13. Answers[2] = new NewestCOServer.Features.QuizShow.Answer(Info[3].Split(':')[0], ushort.Parse(Info[3].Split(':')[1]));
      14. Answers[3] = new NewestCOServer.Features.QuizShow.Answer(Info[4].Split(':')[0], ushort.Parse(Info[4].Split(':')[1]));
      15. Features.QuizShow.Question Q = new NewestCOServer.Features.QuizShow.Question(Question, Answers);
      16. Features.QuizShow.AllQuestions.Add((ushort)x, Q);
      17. }
      18. }
      19. }
      Alles anzeigen

      [FONT="Fixedsys"][COLOR="DarkOrchid"]Hope this helps.[/COLOR][/FONT]
    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )