Trying to set up a facts command

I’ve been trying to add a facts command to my channel. I’m basically copying one from someone else but i keep getting unexpected identifier

$(eval a=$(urlfetch json https://pastebin.com/raw/ZR5ywvPj);a[Math.floor(Math.random()*a.length)])
A link to the pastebin
Facts - Pastebin.com

Can anyone give me a quick hint as to what i’m doing wrong? I’ve checked the forums and

@MaregOverlord Hi!

Probably because the array in that Facts - Pastebin.com is broken.

image

You forget to close the ` backtick at the end.

[`The Great Barrier Reef is the largest eco-system in the world.`,
`Australia has over 60 separate wine regions`,
`Fraser Island is the largest sand island in the world`,
`The Indian Pacific train has the longest straight section of train track in the world`,
`The Great Ocean Road is the world’s largest war memorial`,
`80% of the animals are unique to Australia`,
`2.5 km of Uluru is underground`,
`Tasmania has the cleanest air in the world`,
`90% of Australians live on the coast`,
`The Australian Alps get more snow than the Swiss Alps.`]

Regards

1 Like

That would’ve been embarrassing if that was the block, but I gave it a fix now and it’s still coming back with Unexpected Identifier.

Actually, weirdly enough it seems to be working now. Thanks for your help

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.