---
# System prepended metadata

title: '**Scripting report / Bugs and Requests**'

---

# **Scripting report / Bugs and Requests**

# What is this document?
Cryptovoxels has incorporated scripting in version 1.10.4. This has opened doors to a whole new dynamic world. However, the scripting functionality is not yet fully operational. It has bugs, inconsistencies and lacks some important features. To solve this problem and help the game improve, users that heavily use the scripting engine have joined forces to gather bugs or improvement ideas into one document.

The purpose of this document is not to rush the developer but to signal and communicate.
# Bugs - problems
**These are ranked in order of priority.**
1.  Inconsistencies in Event listening.

| Event    | Name | Wallet |
| -------- | -------- | -------- |
| 'playerenter'    | Player name (eg:Conlan)    | Wallet id     |
| 'playerleave'    | Anonymous  | ""     |
| 'playerchat' (non-existent)    | N/A  | N/A    |

2. After button scripting, parcel sometimes becomes unusable to non-contributors and anonymous accounts. The javascript console is spammed with the following repeated error:

```
client-2.1.5.js:109488 Uncaught TypeError: Cannot read property 'data' of undefined
    at Parcel.getContent (client-2.1.5.js:109488)
    at ParcelScript.connect (client-2.1.5.js:109484)
    at ParcelScript.testBounds (client-2.1.5.js:109484)
    at client-2.1.5.js:109484
```

This can be observed at parcels:

https://www.cryptovoxels.com/play?coords=W@54E,14N
https://www.cryptovoxels.com/play?coords=N@47W,285N

Here are video recordings of the parcels working as intended for the contributor account:

https://www.youtube.com/watch?v=AR-JAHuDDBg
https://cl.ly/fab0fea000b6/test.mov

3. Video object does not refresh after a URL change via script.

4. Images don't refresh after URL change via script.

5. /Broadcast does not work anymore
Pretty self explanatory.

6. getPlayers() not working:
getPlayers() returns only one player (the client) and the player’s name is ‘anonymous’ with wallet = “”


# Requests
Requests are ideas or functionalities that are believed to improve the scripting experience of the game.
**These are ranked in order of priority**

1. Bring back 'playerchat' event.
Being able to access the chat is a nice feature. It can let players interact with the parcel via the chat. For example, if a parcel starts chat with '/screen' then change url of video object by whatever is after the /screen tag.


2.  Parcel scripting .
Old way of scripting is not working. A potential fix is an ‘edit parcel’ option that would let you add a script to the whole parcel. That could help resolve the inconsistencies in event listeners and could potentially lead to the parcel constantly listening to changes. The goal is to be able to allow direct dynamic interactions between the player and the parcel.
This leads to the 2nd point.

3. Multi-users. 
Because we currently have client side scripting, multiplayer minigames won’t work. What a user sees will be different to what another player experiences. A multiplayer support is needed.

4. Music interaction
There is currently no way we can press a button and start an audio object. A .play() .stop() function and a status emitter would be nice.




# Document date
The 23rd of October 2019. Client version of CV at the time: 2.1.5




# Contribution:
* Fayelure
* Conlan