# YeA i DoNt KnOw WhAt To PuT hErE

**URL:** <https://talk.code3dgames.com/t/yea-i-dont-know-what-to-put-here/330>\
**Category:** Uncategorized\
**Created:** [July 21, 2021, 7:11pm UTC](https://talk.code3dgames.com/t/yea-i-dont-know-what-to-put-here/330 "2021-07-21T19:11:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin](https://talk.code3dgames.com/user_avatar/talk.code3dgames.com/martin/32/41_2.png) [@Martin](https://talk.code3dgames.com/u/Martin)\
**Post date:** [July 21, 2021, 7:11pm UTC](https://talk.code3dgames.com/t/yea-i-dont-know-what-to-put-here/330/1 "2021-07-21T19:11:23Z")

</div>

Sorry,  
Yea ErrorTIME  
…  
Problem with my Shader(Particle)  
Output:  
code.html:208 Uncaught TypeError: Cannot read property ‘tick’ of undefined  
at animate (code.html:208)  
My Url:  
[https://is.gd/1cNMyf](https://is.gd/1cNMyf)

---

<div class="post-metadata">

**Author:** ![chris](https://talk.code3dgames.com/user_avatar/talk.code3dgames.com/chris/32/5_2.png) [@chris](https://talk.code3dgames.com/u/chris)\
**Post date:** [July 22, 2021, 4:06am UTC](https://talk.code3dgames.com/t/yea-i-dont-know-what-to-put-here/330/2 "2021-07-22T04:06:39Z")

</div>

The error is telling you that `fire` is undefined on line 208:

```javascript
    fire.tick(dt);

```

Earlier in the code, the `fire` variable is defined inside the `addGoalFire()` function. That function is nearly perfect – the only problem is that it is not called. So, above, in the code outline, you need to call this function. Place it after the `addGoalLight()` call:

```javascript
reset();
addGoalLight();
addGoalFire();
addBackground();

```

After making that change, there is another error:

```auto
Uncaught TypeError: goalFire.disabled is not a function
    at addGoalFire (code.html:159)
    at code.html:40
    at _.html:10

```

This is caused by a small typo on line 159:

```javascript
  goalFire.disabled();

```

That should be “disable” instead of “disabled”:

```javascript
  goalFire.disable();

```

That fixes almost everything. Except when you are able to get the ball into the goal. When that happens, you’ll get the following error (the line number may be slightly different for you):

```auto
code.html:167 Uncaught ReferenceError: goalLight is not defined
    at window.Physijs.Physijs.BoxMesh.win (VM70 code.html:167)

```

I’ll let you fix that one, though. I think you can spot the error there. If not, let me know and I’ll tell you 🙂

-Chris

---

<div class="post-metadata">

**Author:** ![Martin](https://talk.code3dgames.com/user_avatar/talk.code3dgames.com/martin/32/41_2.png) [@Martin](https://talk.code3dgames.com/u/Martin)\
**Post date:** [July 23, 2021, 1:12am UTC](https://talk.code3dgames.com/t/yea-i-dont-know-what-to-put-here/330/3 "2021-07-23T01:12:19Z")

</div>

Yea i found the mistake…  
I wrote at Line 165-167  
I deleted:  
goalLight1.material.visible = !goalLight1.material.visible;  
goalLight2.material.visible = !goalLight.material.visible;  
These two Lines now it work perfectly
