-- move on to next question
on nextQuestion me
pQuestionNum = pQuestionNum + 1
if pQuestionNum > pDataMember.text.line.count then
-- no more questions
go to frame pEndGameFrame
else
askQuestion(me)
end if
end

You have asked this question both here and on the DOUG
forums.
Part of the reason you haven't had it solved for you (or been
able to
fix it yourself) is because you haven't provided enough
information.
Do you get this error when you compile the script (the
lightning bolt at
the top of all script windows) or when you run the file
containing this
script?
Do you get it the first time the script runs, or after it has
asked a
couple of questions?

If you run the file in the authoring environment, when an
error occurs
you should be presented with a "Debug" button which will open
the
current script and show local, property and global variables
in one of
the left-hand panes. I suspect that the error is due to
pQuestionNum
being VOID or pDataMember being VOID or of the wrong type.
Try adding the following couple of lines to the 'on
askQuestion' handler
and look for output in your message window:
--
on askQuestion me
put "question number:", pQuestionNum
put pDataMember, pDataMember.type
put pDataMember.text
-- get the data
text = pDataMember.text.line[pQuestionNum]
-- ... etc.