if (randomQuestion) and (randomID) then
_currentQuestion = randomID
questions[randomID][3] = true
local posY = 63
for i,v in ipairs(randomQuestion[4]) do
if (i ~= 1) then
posY = (posY or 63)+20
end
guiSetText(exam.label[1], randomQuestion[1])
exam.radiobutton[#exam.radiobutton+1] = guiCreateRadioButton(45, posY, 405, 18, randomQuestion[4][1], false, exam.window[1])
end
guiSetText(exam.window[1], "Exam (Question " .. currentQuestion .. " of " .. maxQuestions .. ")")
else
guiSetText(exam.label[1], "Error occured! Click 'Cancel Exam' to get an instant refund.")
guiSetEnabled(exam.button[1], false)
end
This is part of my dmv script however whenever i got to the dmv ped ingame, it lets me answer like 2-4 questions, then it will either bug and display nothing, or it will give this error "Error occured! Click 'Cancel Exam' to get an instant refund.". I dont know how to fix this ive been trying for a week now. Please may someone help.