# App Lab - Color Sleuth - not keeping score

**URL:** <https://forum.code.org/t/app-lab-color-sleuth-not-keeping-score/39481>\
**Category:** Uncategorized\
**Created:** [May 17, 2024, 10:53am UTC](https://forum.code.org/t/app-lab-color-sleuth-not-keeping-score/39481 "2024-05-17T10:53:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.digiovanni](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/a.digiovanni/32/8926_2.png) [@a.digiovanni](https://forum.code.org/u/a.digiovanni)\
**Post date:** [May 17, 2024, 10:53am UTC](https://forum.code.org/t/app-lab-color-sleuth-not-keeping-score/39481/1 "2024-05-17T10:53:51Z")

</div>

One of my students is working on the Color Sleuth project in App Lab.

Here is a view of her app in its current state:  
[App Link](https://studio.code.org/projects/applab/LkjzwOMQG5S6ZSFWV8EvmrFpHJQ5sckhOYzZ1Dk2pjQ/view)

The code is switching players after each selection, it’s indicating (correctly) in the console whether or not each selection is right or wrong, and is seemingly intending to add or subtract the appropriate number of points in each case (+2 for correct; -1 for incorrect). However, it is not writing the scores to the screen in the app for either player.

Any thoughts would be helpful. Thanks!

---

<div class="post-metadata">

**Author:** ![melynn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/melynn/32/4925_2.png) [@melynn](https://forum.code.org/u/melynn)\
**Post date:** [May 17, 2024, 4:39pm UTC](https://forum.code.org/t/app-lab-color-sleuth-not-keeping-score/39481/2 "2024-05-17T16:39:04Z")

</div>

Hi @a.digiovanni,

Very creative game! The structure appears to be correct. The student just needs to adjust the syntax so that the function **updateScoreBy(amt)** is called correctly because this function is where the work is done to update p1score and p2score and display the scores. Right now, if the player chooses correctly, the code says: ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/8/8d24dd6632f8af95a97259871b0d47a4fe875f51.png). This code points to a variable but does not run the function. Instead, look for this block to call the updateScoreBy(amtOfPoints) function: ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/2/2137ef30e621e2933f3a296debd5430fd7c8582f.png). Also, I don’t believe the variable updateScoreBy is needed and can be deleted.

Hope that helps!  
~Michelle

---

<div class="post-metadata">

**Author:** ![a.digiovanni](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/a.digiovanni/32/8926_2.png) [@a.digiovanni](https://forum.code.org/u/a.digiovanni)\
**Post date:** [May 22, 2024, 9:34am UTC](https://forum.code.org/t/app-lab-color-sleuth-not-keeping-score/39481/3 "2024-05-22T09:34:50Z")

</div>

Many thanks Michelle!
