# Need help with pong game

**URL:** <https://forum.kirupa.com/t/need-help-with-pong-game/74039>\
**Category:** programming\
**Created:** [December 23, 2004, 12:20am UTC](https://forum.kirupa.com/t/need-help-with-pong-game/74039 "2004-12-23T00:20:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![von\_dragon](https://avatars.discourse-cdn.com/v4/letter/v/edb3f5/32.png) [@von\_dragon](https://forum.kirupa.com/u/von_dragon)\
**Post date:** [December 23, 2004, 12:20am UTC](https://forum.kirupa.com/t/need-help-with-pong-game/74039/1 "2004-12-23T00:20:58Z")

</div>

Im attemping to make my first game even tho it is a modified version of an example file in a book i bought.

My problem is the score right now. I already have a function that checks for collistions with the walls but i want to add some code to make the score go up one for the computer if the ball touches the left wall and go up 1 for the player if the ball touches the right wall. But my code wont work.

I have 2 dynamic text boxes 1 named YourScore for the players score and one named CompScore for the computers score. the code i added to set the initial scores for each player was

```auto
YourScore = 0; 
CompScore = 0;  

```

the code to raise the score by one for each player was put inside my checkforWalls function in the if statement.

```auto
this.YourScore += 1;
this.CompScore += 1;

```

Heres the source of my game and i am using flash MX 2004 Professional.

Thx in advance
