Skip to content

Error Text Block

ROLEG provides error messages if certain events during the experiment trigger these errors. One example would be when a choice block requires an option to be selected, but the participant clicks the continue button without doing so. An error message (You must select at least one answer in English) is then displayed.

These error messages are available in English, Dutch, and German, and depend on which language is set for the experiment. An error_text block can be added to the experiment to customise these error messages or to translate them to another language. The structure of this block is summarised below.

Note

If error_text is used in an experiment block, the specified text settings are inherited by every following trial. If error_text is used in an include block of an include file, the specified error texts are inherited by every following trial within that include file only. Alternatively, error_text can be used within a trial block to only apply within the scope of the trial. Only the specified error texts will be overwritten, other error texts will be inherited.

Parameters

no_selection
Optional.
String that specifies the error message for when no selection is made.
no_answer
Optional.
String that specifies the error message for when no answer has been given.
speech_in_progress
Optional.
String that specifies the error message for when audio recording in a speech response block is still in progress.
speech_yet_to_start
Optional.
String that specifies the error message for when audio recording in a speech response block has not started yet.
media_in_progress
Optional.
String that specifies the error message for when audio or video playing in a media stimulus block is still in progress.

Example usage

The code below illustrates how the error_text block might be used.

experiment {
    // Specify error messages once, in Swedish:
    error_text {
        no_selection = "Du måste fylla in ett svar"
        no_answer = "Du måste åtminstone välja ett svar"
        speech_in_progress = "Vänta tills röstinspelningen slutar"
        speech_yet_to_start = "Vänta tills röstinspelningen startar"
    }

    // Rest of the experiment inherits these texts.

}
Back to top