Changing Trial Errors
October 13, 2020 02:20PM
Hi!

I would like to be able to change the trial error coding so that I can add something more helpful for us. Specifically, I'd like to add another option that is cued when the animal selects the background (using ComplementaryWindow) but I cannot seems to figure out how to go about doing this.

I have attempted to change the trial errors available in the trial holder_v2.m timing file, but whenever the task is run it does not change anything. I end up redirected to task name_runtime.m where it does not show that I made any changes. Could you direct me to what files need to be altered for me to make this change? I am having a hard time locating what I should be changing.

Thank you!
Re: Changing Trial Errors
October 14, 2020 02:38PM
The string error codes of trialerror() are just nominal labels. There is nothing that prevents you from putting your own labels on the numeric codes. Modifying the timing script functions is not recommended, since it will make your scripts incompatible with future releases.
Re: Changing Trial Errors
October 14, 2020 03:54PM
Hi Jaewon,

Thank you, I will avoid modifying the Monkey Logic timing files.

I think I am missing where to find the nominal labels for the trial errors. Which file should I be altering to change their labels?

Thanks again!
Re: Changing Trial Errors
October 15, 2020 04:31PM
Maybe I was not clear. Changing the labels is modifying the timing script function, which will make your script incompatible with future releases. So what I meant was to use just numeric error codes in the task script and convert them to string labels of your own later.

However, I got an idea how to avoid the incompatibility issue. Now you can register your own labels with the trialerror function. See the manual page.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#trialerror
Re: Changing Trial Errors
October 19, 2020 02:47PM
That makes sense to me now, thank you!

The solution you had worked perfectly, I appreciate the help!

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.