akram03 Posted April 21, 2018 Posted April 21, 2018 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.
Dimos7 Posted April 21, 2018 Posted April 21, 2018 put the code used not onlky a part aslos us the icon with <> and place your code there
idarrr Posted April 27, 2018 Posted April 27, 2018 This thing here if (randomQuestion) and (randomID) then else -- if code executed here, statement above return false end randownQuestion or randomID value may contain nil value
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now