I need help with error: Uncaught TypeError: Cannot read properties of undefined (reading 'socket')
Archiviert a year ago
Z
Zoxoer
So im coding an basic script that will send packets in game.
and i dont know why i get this error i tried every way to fix it but they failed.
Here's the unchanged code:
```js
let doNewSend = window.io.send;
```
everytime i call the doNewSend example:
```js
doNewSend("6", "hello"); // it gives me the type error Cannot read properties of undefined (reading 'socket') instead of sending "hello".
```
