# Help with a Problem

**URL:** <https://discourse.processing.org/t/help-with-a-problem/6048>\
**Category:** Coding Questions\
**Created:** [November 28, 2018, 9:09pm UTC](https://discourse.processing.org/t/help-with-a-problem/6048 "2018-11-28T21:09:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![drakenus777](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@drakenus777](https://discourse.processing.org/u/drakenus777)\
**Post date:** [November 28, 2018, 9:09pm UTC](https://discourse.processing.org/t/help-with-a-problem/6048/1 "2018-11-28T21:09:25Z")

</div>

Relatively New Programmer Asking for help.

So I am making a Beginner “game” in processing where I’m to supposed reset a character’s timer when they collide with an enemy. Here is the code:

```
public void timer()
{
	newtime = millis()/1000; 
	textSize(20);
	fill(40,40,160);
	text("Time Alive:" + newtime, 40, 90);	
}

```

Whenever I try to set newtime to zero, even at a specific life count, the timer does not reset. I even tried to do this with about 30 lines of code with if statements for each life count. Didn’t work. Any ideas?

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [November 28, 2018, 9:11pm UTC](https://discourse.processing.org/t/help-with-a-problem/6048/2 "2018-11-28T21:11:29Z")

</div>

Hi,

Can we see a full code of what you have tried ? Specially how this function is used in your code.
