'GetNumber' function help

Hi all,

I tried using the GetNumber function because I want to record any subject numerical keyboard input to save later (numbers in the form of #.##) But during this block of code, the screen just stays on the "Bid?" prompt trial.

My problems are: 1) how can I use GetNumber (or any applicable function) to save numerical responses in the variable 'dollaramount'? and 2) Why isn't KbWait/KbCheck allowing me to advance to the next screen after the subject enters their numerical response?

% Bid Trial.
DrawFormattedText(w, 'Bid?', 'center', 'center', [0 0 0], 40);
Screen('Flip',w);
%WaitSecs(2);

% Record keyboard input
dollaramount = GetNumber;

% Save answer into structure called "answers"
answers().id = subID;
answers().trial_number=trial_number;
answers().dollaramount = dollaramount;

% Wait for key response
KbWait;
while KbCheck;
end;

Thank you!