# Whats wrong with this?

**URL:** <https://forum.kirupa.com/t/whats-wrong-with-this/24275>\
**Category:** flash\
**Created:** [June 28, 2003, 4:28am UTC](https://forum.kirupa.com/t/whats-wrong-with-this/24275 "2003-06-28T04:28:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cardjorg](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cardjorg](https://forum.kirupa.com/u/cardjorg)\
**Post date:** [June 28, 2003, 4:28am UTC](https://forum.kirupa.com/t/whats-wrong-with-this/24275/1 "2003-06-28T04:28:40Z")

</div>

hello can anyone tellme whats wrong with this script  
please?

onClipEvent(enterFrame){  
\_root.gScore = currentScore1+currentScore2+currentScore3+currentScore4+currentScore5;  
\_root.cScore = \_root.bScore1+\_root.bScore2+\_root.bScore3+\_root.bScore4+\_root.bScore5+\_root.bScore6+\_root.bScore7+\_root.bScore8+\_root.bScore9+\_root.bScore10+\_root.bScore11+\_root.bScore12+\_root.bScore13+\_root.bScore14+\_root.bScore15;  
// I suspect the error is here  
if (\_root.tScore \<= 0){  
\_root.tScore=0;

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 28, 2003, 7:09am UTC](https://forum.kirupa.com/t/whats-wrong-with-this/24275/2 "2003-06-28T07:09:26Z")

</div>

whuts all that about, what are u trying to do, and what isnt working?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 28, 2003, 11:59am UTC](https://forum.kirupa.com/t/whats-wrong-with-this/24275/3 "2003-06-28T11:59:24Z")

</div>

… and whats the rest of the code? its been cutoff (or you didnt finish it)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 28, 2003, 1:56pm UTC](https://forum.kirupa.com/t/whats-wrong-with-this/24275/4 "2003-06-28T13:56:44Z")

</div>

I’m just a newb but try this:

onClipEvent(enterFrame){  
\_root.gScore = currentScore1+currentScore2+currentScore3+currentS  
core4+currentScore5;  
\_root.cScore = \_root.bScore1+\_root.bScore2+\_root.bScore3+\_root.bScore4+\_root.bScore5+\_root.bScore6+\_root.bScore7+\_root.bScore8+\_root.bScore9+\_root.bScore10+\_root.bScore11+\_root.bScore12+\_root.bScore13+\_root.bScore14+\_root.bScore15;  
if (\_root.tScore \<= 0){  
\_root.tScore=0  
}  
}

I think you forgot the 2 “}”

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 28, 2003, 2:43pm UTC](https://forum.kirupa.com/t/whats-wrong-with-this/24275/5 "2003-06-28T14:43:26Z")

</div>

what i’m doing is a d&drop quiz, that has 5 right answers out of 19 i want each of the right answers to have a 20 % value i got the score set up and everything works fine but one think wich is that i want to take off 20% for each additional answer some one puts in the target but there is a posibility of of a negative answer so i tested and works fine just that i still get a negative answer when i put a wrong answer and none right answers.  
the problem i think its in the :

if (\_root.tScore \<=0){  
tScore = 0;  
}
