- This topic has 2 replies, 1 voice, and was last updated 6 years, 3 months ago by
Matthew Hunt.
-
AuthorPosts
-
November 8, 2018 at 2:11 pm #1804
Matthew Hunt
GuestHi again,
I am trying to run a simple scale experiment through a spreadsheet. It has 2 lines of dialogue. The first is always the same then the second is fed from the spreadsheet. The beginning of my code looks like this:
var shuffleSequence = seq(randomize(“Sentence”);
PennController.ResetPrefix(null);
PennController.Template(row => PennController(
newText(“left label”, “uneducated”)
,
newText(“right label”, “educated”)
,
newText( “question”, ” P1: I just got promoted at work”)
.settings.italic()
.settings.center()
.print()
,
newText( “Sentence” , row.Sentence )
.settings.italic()
.settings.center()
.print()
,——————-
This is followed by a question and a scale of 1-7. It all works fine without the top line (starting var), but when I add that to randomise the sentence from the spreadsheet it says ‘ERROR: There must be some items in the running order!’ when I run the exp. Any ideas?
Best,
Matthew
November 8, 2018 at 10:09 pm #1805Jeremy
KeymasterHi again,
It looks like the problem is coming from a missing closing parenthesis in your first line. The bit of code you pasted has this line:
var shuffleSequence = seq(randomize("Sentence");
when it should bevar shuffleSequence = seq(randomize("Sentence"));
(note the two closing parentheses)(Also, I see you don’t define a “Sentence” label as the first argument of your PennController() command—is it intentional? You need some trials labeled “Sentence” if that’s your definition of shuffleSequence)
November 14, 2018 at 5:38 pm #1857Matthew Hunt
GuestHi Jeremy,
Thanks a lot. I ended up with the following which worked (where “1” is a column in my spreadsheet):
PennController.Sequence( randomize(“1”) );
PennController.ResetPrefix(null);
PennController.AddHost(“http://files.lab.florianschwarz.net/ibexfiles/PennController/SampleTrials/”);
PennController.Template( PennController.defaultTable.filter(“Type”,”1″)etc etc
best,
Matthew
-
AuthorPosts
- You must be logged in to reply to this topic.