Closed sv-du closed 2 years ago
Hello again The pastebin which I provided is an example of what you can find in the Challenge.data object Meaning that, the string_table is accessible using Challenge.data.string_table If you would like the instruction string, you can use
challenge.data.string_table[`${challenge.data.game_data.gameType}.instructions-${challenge.data.game_data.game_variant}`]
That's the thing, when I tried to access it, I got the following error
Property 'string_table' does not exist on type 'ChallengeData'
Ah, are you using TypeScript by any chance? I only partially implemented the data object into the ChallengeData interface which may cause this error. I believe you can tell typescript to ignore the next line using // @ts-ignore
I will add it eventually.
Yea I'm using Typescript, and I thought doing // @ts-ignore does that for the whole file, no?
// @ts-ignore only ignores the next line, while // @ts-nocheck does it for the whole file At least that's what I think
The properties have been added
As a bonus, there is now an instruction
accessor in the Challenge class which will directly give you the instruction string
Hello, I'm requesting that you add the string_table property in challenges, as it appears like there's a property like that in the challenge pastebin that you provide. Either that, or a method that converts a game_variant to an objective