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 Code:
public static void LoadQuestions()
Under that you should see this Code:
{
{
string[] AllLines = System.IO.File.ReadAllLines("C:\\OldCODB\\QuizShow.txt");
int questionscount = AllLines.Length;
for (int x = 0; x < questionscount; x++)
{
string[] Info = AllLines[x].Split('#');
string Question = Info[0];
Features.QuizShow.Answer[] Answers = new NewestCOServer.Features.QuizShow.Answer[4];
Answers[0] = new NewestCOServer.Features.QuizShow.Answer(Info[1].Split(':')[0], ushort.Parse(Info[1].Split(':')[1]));
Answers[1] = new NewestCOServer.Features.QuizShow.Answer(Info[2].Split(':')[0], ushort.Parse(Info[2].Split(':')[1]));
Answers[2] = new NewestCOServer.Features.QuizShow.Answer(Info[3].Split(':')[0], ushort.Parse(Info[3].Split(':')[1]));
Answers[3] = new NewestCOServer.Features.QuizShow.Answer(Info[4].Split(':')[0], ushort.Parse(Info[4].Split(':')[1]));
Features.QuizShow.Question Q = new NewestCOServer.Features.QuizShow.Question(Question, Answers);
Features.QuizShow.AllQuestions.Add((ushort)x, Q);
}
}
} Replace it with this.
Code:
{
if (File.Exists(@"C:\OldCODB\QuizShow.txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\QuizShow.txt");
int questionscount = AllLines.Length;
for (int x = 0; x < questionscount; x++)
{
string[] Info = AllLines[x].Split('#');
string Question = Info[0];
Features.QuizShow.Answer[] Answers = new NewestCOServer.Features.QuizShow.Answer[4];
Answers[0] = new NewestCOServer.Features.QuizShow.Answer(Info[1].Split(':')[0], ushort.Parse(Info[1].Split(':')[1]));
Answers[1] = new NewestCOServer.Features.QuizShow.Answer(Info[2].Split(':')[0], ushort.Parse(Info[2].Split(':')[1]));
Answers[2] = new NewestCOServer.Features.QuizShow.Answer(Info[3].Split(':')[0], ushort.Parse(Info[3].Split(':')[1]));
Answers[3] = new NewestCOServer.Features.QuizShow.Answer(Info[4].Split(':')[0], ushort.Parse(Info[4].Split(':')[1]));
Features.QuizShow.Question Q = new NewestCOServer.Features.QuizShow.Question(Question, Answers);
Features.QuizShow.AllQuestions.Add((ushort)x, Q);
}
}
} Hope this helps.
Lesezeichen