#1: You cannot use conditional logic in /items attributes:
<text YesAnswer>
/items = (if '[<%item.Practice_correctResponse.item(text.Practice_first.currentindex)%>'== 205]"You answered YES. That's CORRECT!"
else if '[<%item.Practice_correctResponse.item(text.Practice_first.currentindex)%>'== 203] "You answered YES. That's INCORRECT!
The correct answer was NO.")
...
</text>
<text NoAnswer>
/items = (if '[<%item.Practice_correctResponse.item(text.Practice_first.currentindex)%>'== 203]"You answered NO. That's CORRECT!"
else if '[<%item.Practice_correctResponse.item(text.Practice_first.currentindex)%>'== 205] "You answered NO. That's INCORRECT!
The correct answer was YES.")
...
</text>
<text Feedback>
/items = ([if [openended.Practice_segment.response == item.Practice_FB_segment.item(text.Practice_first.currentindex)
"CORRECT:
You answered '<%tolower(openended.Practice_segment.response)%>'.
The correct word is '<%item.Practice_correctAnswer.item(text.Practice_first.currentindex)%>'"
else
"INCORRECT:
You answered '<%tolower(openended.Practice_segment.response)%>'.
The correct word is '<%item.Practice_correctAnswer.item(text.Practice_first.currentindex)%>'")
...
</text>
None of that is valid syntax -- it will not (and should not) work.
Use /ontrialbegin to select the proper item based on the response given. I've fixed this for the <openended> part in the attached script. I suggest you carefully review the changes and then do something along the same lines for the "yes/no" question part.
Beyond that, I believe your feedback questions have already been addressed previously here:
https://www.millisecond.com/forums/Topic19461.aspx . It may be a good idea to review this again.
#2: "I would like also to center the feedback"
You need to specify the <text> element's /size attribute.
#3: "Then I would like to code in the datafile the trial conditions as
"item 1 = social, item 2 = physical, item 3 = exercice"
<list condition>
/items = ("Social", "Physical", "Exercise")
/selectionmode = text.Practice_first.currentindex
</list>
and log list.condition.nextvalue to the data file.
- "the correct answer"
Create a <values> entry, store the correct answer there. Log the value to the data file.
"the given answer and if it was correct or not."
Log the standard 'response' and 'correct' columns to the data file.