showAchievements is not defined with CSIDE

Assuming I did something wrong, which I don’t know if I did. I created a single achievement and it works, but when I click the achievement button it shows this error Reference error. showAchievements is not defined. Did I miss something? How much volume of coffee do I have to drink to fix it?
Got any links or tips?

1 Like

Always helpful if you post your code. Also, what environment are you using? E.g. Web browser (which one)?

1 Like

I use firefox,
*achievement flow visible 10 Flow
Description text
Description after achievement unlock
I wrote it on the startup.txt

I wrote this one after you choose an option,
This is the code I used to activate it
*achieve Flow

Yes, the achievement does work.
But the achievement button sends an error message.

Assuming I did something wrong, which I don’t know if I did. I created a single achievement and it works, but when I click the achievement button it shows this error Reference error. showAchievements is not defined. Did I miss something? How much volume of coffee do I have to drink to fix it?
Got any links or tips?

First, make sure you have the latest copy of CS.
Next, copy the code you’re using.
Third, what browser are you using? (If it’s not Firefox, switch to Firefox.)

So…I finally had to make an achievement and I tried your suggestion.
The achievement button still gives me the error message, but the achievement still triggers.
I am using Firefox. :confused:

The achievement code that I used
*achievement emberspar1 visible 10 Impress Ember
    Fire in their heart, Demon in your soul.
    Fire in their heart, Demon in your soul.

Are you able to access the achievements screen prior to triggering it?

Aside from out of date CS suite / accessing from the wrong browser, I can think of a few issues.

Most likely is that you have it in the incorrect part of the startup.txt, however, you stated that it allows the player to acquire the cheevo.

Without seeing the entire string of code, my next best guess is that the code doesn’t like you using the same wording. I’ve had that issue in other scripting languages before, where the code gets confused and sort of goes into a feedback loop.

Maybe change it, if nothing else works?

Example, because sometimes I'm bad at words
*achievement rider visible 15 In the Air 
 How will you take flight?
 Became a Dragon Rider!

(edit: for some reason, my phone lost the formatting. I c/p’d from my own file, and yet)

1 Like

No, I cannot. it just gives me the error message

Do you have the most up to date CS suite?

Yes, I believe this is the most recent one.

Alright, next question: how do you have your achievements organized within your file?

Are you accessing this through the playtest within CS Suite or through a hosting website, such as DD?

I’m using Dashingdon, I don’t know how to run the game through CSIDE. I am new to CSIDE, I’ve been using Notepad ++

Okay. Yeah, I’ve never used the IDE. There is an executable within the choicescript files, which allows you to try out your game, yourself.

Hrm. My guess, then, pops back to it being an issue in the code/formatting, because DD has all the other necessary background files already - you just upload images and text files.

Did you put your achievements last? They should be the last thing you create, before starting the game itself.

And, since I’m on mobile, my best way to show you what I mean is - this

@ashestoashes018 Yes I did create them last.
Even if I run the .exe file or use dashingdon, it still gives me error message.

You have more than one achievement? Hm…Is your indentation accurate within the file?

Ah yes, it is. I used two spaces for the before and after triggering the achievement.
And I only have one achievement. :confused:

Try adding one more visible achievement.

And can you explain what you mean by 2 spaces before? It should be either 1 tab or 1 space.

Didn’t work. I must be cursed.

It was the Description, this time I used 1 tab. Still didn’t work.
I blame Thanos for this

Okay, last ditch effort on my part-

can you attach a screenshot of the error as well as of the offending lines of code?

Not sure if you can see it, I don't know how to zoom in

Error


EDIT: I ran the game using CSIDE, the achievement button seems to work. It gives error messages when I use Dashingdon

I am tempted to code dive and see if there’s something wrong with the .js files