# showAchievements is not defined with CSIDE

**URL:** <https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853>\
**Category:** ChoiceScript Help\
**Created:** [November 6, 2018, 3:02pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853 "2018-11-06T15:02:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bathala](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bathala/32/273735_2.png) [@Bathala](https://forum.choiceofgames.com/u/Bathala)\
**Post date:** [November 6, 2018, 3:02pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/1 "2018-11-06T15:02:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [November 6, 2018, 4:59pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/2 "2018-11-06T16:59:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bathala](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bathala/32/273735_2.png) [@Bathala](https://forum.choiceofgames.com/u/Bathala)\
**Post date:** [November 7, 2018, 1:31am UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/3 "2018-11-07T01:31:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hoangcv18](https://avatars.discourse-cdn.com/v4/letter/h/7bcc69/32.png) [@hoangcv18](https://forum.choiceofgames.com/u/hoangcv18)\
**Post date:** [November 26, 2018, 8:39am UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/4 "2018-11-26T08:39:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [November 26, 2018, 8:44am UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/5 "2018-11-26T08:44:14Z")

</div>

First, make sure you have [the latest copy of CS](http://github.com/dfabulich/choicescript/zipball/master).  
Next, copy the code you’re using.  
Third, what browser are you using? (If it’s not Firefox, switch to Firefox.)

---

<div class="post-metadata">

**Author:** ![Bathala](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bathala/32/273735_2.png) [@Bathala](https://forum.choiceofgames.com/u/Bathala)\
**Post date:** [January 10, 2019, 4:21pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/6 "2019-01-10T16:21:07Z")

</div>

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. 😕

> **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.
> 
> ```

---

<div class="post-metadata">

**Author:** ![ashestoashes018](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/ashestoashes018/32/144436_2.png) [@ashestoashes018](https://forum.choiceofgames.com/u/ashestoashes018)\
**Post date:** [January 10, 2019, 4:28pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/7 "2019-01-10T16:28:53Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Bathala](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bathala/32/273735_2.png) [@Bathala](https://forum.choiceofgames.com/u/Bathala)\
**Post date:** [January 10, 2019, 4:30pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/8 "2019-01-10T16:30:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ashestoashes018](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/ashestoashes018/32/144436_2.png) [@ashestoashes018](https://forum.choiceofgames.com/u/ashestoashes018)\
**Post date:** [January 10, 2019, 4:33pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/9 "2019-01-10T16:33:36Z")

</div>

Do you have the most up to date CS suite?

---

<div class="post-metadata">

**Author:** ![Bathala](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bathala/32/273735_2.png) [@Bathala](https://forum.choiceofgames.com/u/Bathala)\
**Post date:** [January 10, 2019, 4:34pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/10 "2019-01-10T16:34:22Z")

</div>

Yes, I believe this is the most recent one.

---

<div class="post-metadata">

**Author:** ![ashestoashes018](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/ashestoashes018/32/144436_2.png) [@ashestoashes018](https://forum.choiceofgames.com/u/ashestoashes018)\
**Post date:** [January 10, 2019, 4:36pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/11 "2019-01-10T16:36:28Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Bathala](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bathala/32/273735_2.png) [@Bathala](https://forum.choiceofgames.com/u/Bathala)\
**Post date:** [January 10, 2019, 4:37pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/12 "2019-01-10T16:37:47Z")

</div>

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 ++

---

<div class="post-metadata">

**Author:** ![ashestoashes018](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/ashestoashes018/32/144436_2.png) [@ashestoashes018](https://forum.choiceofgames.com/u/ashestoashes018)\
**Post date:** [January 10, 2019, 4:40pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/13 "2019-01-10T16:40:31Z")

</div>

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](https://dashingdon.com/play/ashestoashes018/explosion-private-beta/mygame/scenes/startup.txt)

---

<div class="post-metadata">

**Author:** ![Bathala](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bathala/32/273735_2.png) [@Bathala](https://forum.choiceofgames.com/u/Bathala)\
**Post date:** [January 10, 2019, 4:45pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/14 "2019-01-10T16:45:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ashestoashes018](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/ashestoashes018/32/144436_2.png) [@ashestoashes018](https://forum.choiceofgames.com/u/ashestoashes018)\
**Post date:** [January 10, 2019, 4:53pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/15 "2019-01-10T16:53:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bathala](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bathala/32/273735_2.png) [@Bathala](https://forum.choiceofgames.com/u/Bathala)\
**Post date:** [January 10, 2019, 4:54pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/16 "2019-01-10T16:54:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ashestoashes018](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/ashestoashes018/32/144436_2.png) [@ashestoashes018](https://forum.choiceofgames.com/u/ashestoashes018)\
**Post date:** [January 10, 2019, 4:58pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/17 "2019-01-10T16:58:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bathala](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bathala/32/273735_2.png) [@Bathala](https://forum.choiceofgames.com/u/Bathala)\
**Post date:** [January 10, 2019, 5:02pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/18 "2019-01-10T17:02:17Z")

</div>

Didn’t work. I must be cursed.

> [@ashestoashes018](#):
>
> And can you explain what you mean by 2 spaces before? It should be either 1 tab or 1 space.

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

---

<div class="post-metadata">

**Author:** ![ashestoashes018](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/ashestoashes018/32/144436_2.png) [@ashestoashes018](https://forum.choiceofgames.com/u/ashestoashes018)\
**Post date:** [January 10, 2019, 5:06pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/19 "2019-01-10T17:06:47Z")

</div>

Okay, last ditch effort on my part-

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

---

<div class="post-metadata">

**Author:** ![Bathala](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bathala/32/273735_2.png) [@Bathala](https://forum.choiceofgames.com/u/Bathala)\
**Post date:** [January 10, 2019, 5:11pm UTC](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853/20 "2019-01-10T17:11:48Z")

</div>

> **Not sure if you can see it, I don't know how to zoom in**
>
> ![fix%20this](https://global.discourse-cdn.com/choiceofgames/original/3X/4/0/404270200b62337bea7fd4fdd237ed722fdf70e7.png)

> **Error**
>
> ![FIX%20THIS%20AGAIN](https://global.discourse-cdn.com/choiceofgames/original/3X/2/4/24c4cc30fe67d950d17c73551a9d323e7f565a6b.png)  
> 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

[Next page](https://forum.choiceofgames.com/t/showachievements-is-not-defined-with-cside/45853.md?page=2)
