# Purple Monster ore Platformgame

**URL:** <https://talk.code3dgames.com/t/purple-monster-ore-platformgame/598>\
**Category:** Uncategorized\
**Created:** [March 27, 2023, 11:26am UTC](https://talk.code3dgames.com/t/purple-monster-ore-platformgame/598 "2023-03-27T11:26:34Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [March 27, 2023, 7:52pm UTC](https://talk.code3dgames.com/t/purple-monster-ore-platformgame/598/4 "2023-03-27T19:52:33Z")

</div>

Welcome to programming! All JavaScript programmers hate the JavaScript console, so you will fit right in 🙂

Even though we hate the JavaScript console, we learn to use it as well as we can because it can be amazingly helpful – as you found out.

When I enter your code in, I see the following in the JavaScript console:

```auto
VM151 code.html:7 Uncaught TypeError: Cannot set properties of undefined (setting 'ammo')
    at VM151 code.html:6:21
    at code.html:10:12

```

Line #6 (and #7) are:

```javascript
Physijs.script.ammo = '/ammo.js';
Physijs.script.worker = '/physijs_worker.js';

```

The problem here is that we need to set the `ammo` and `worker` properties on `Physijs.scripts` (ending with an “s”), but the code currently has `Physijs.script` (no “s” at the end).

When I change those two lines to:

```javascript
Physijs.scripts.ammo = '/ammo.js';
Physijs.scripts.worker = '/physijs_worker.js';

```

Then I see the sky and the ground. Hopefully that fixes it for you as well.

-Chris

P.S. It is easier to post code in here if you follow the instructions in [this post](https://talk.code3dgames.com/t/welcome-to-3d-game-programming-for-kids-read-this-first/8).

---

_[View the full topic](https://talk.code3dgames.com/t/purple-monster-ore-platformgame/598)._
