Issue with %0 placeholder when the input box change to a blank input
I am setting a quiz applet. The pupil should write the answer in an input box (valid range: -5 to 5). If the quiz is evaluated (boolean object == true), the answer won't change, else (boolean == false) the answer will change. I use GeoGebra script, with %0 placeholder for the inputbox. I have an issue: if the input changes from any value (valid or not valid) to an empty answer, I got an error message:
"Error in script at the line 1 (called from InputBox1)
Please check your input".
The error is in the command: SetValue(a, "%0")
I have added the following line, but the error remains (just at this line, even with isEvaluated == true):
If(IsEvaluated == false ∧ Length("%0") > 0, SetValue(a, "%0"))
I have several days trying to solve this issue. Could you help me with a suggestion to avoid this error?
P.S. English is not my mother tongue; please excuse any errors on my part.