Text Component shows "Hello World" instead of the stimuli

URL of experiment: Pavlovia

Description of the problem: In my experiment, participants are asked to rate how morally wrong a vignette is. The text component I used to display the vignette draws the content of the text from an excel file. I used the code component to randomize the gender of the character in the vignette with this code (MalePerp, FemalePerp, and UnisexPerp are column names in the excel file)

RandomNum = Math.random();
function shuffle(PictureList){
    
};
if ((RandomNum <= 0.33)) {
    TextShown = MalePerp;
    PictureShown = "MalePicture.png";
} else {
    if (((0.33 < RandomNum) && (RandomNum <= 0.66))) {
        TextShown = FemalePerp;
        PictureShown = "FemalePicture.png";
    } else {
        TextShown = UnisexPerp;
        var PictureShown = PictureList[0];
    }
}

However, this doesn’t work and instead of drawing from the excel file, it just says “Hello World” in every routine. This method works locally, and since I don’t really know anything about js I can’t seem to figure it out.

Is the code component above the text component?

It is in psychopy and works as intended locally, but I haven’t changed the order of anything in the auto-translated javascript file since I don’t really know how :sweat_smile:

Please could you show a screenshot of your routine?

I have a similar issue, Hello world is displayed instead of my text stimuli from xlsx file on Pavlovia: