Coding Global Background
Coding Global

I need help with error: Uncaught TypeError: Cannot read properties of undefined (reading 'socket')

Archived a year ago
3 messages
1 members
2 years ago
Open in Discord
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". ```

Replies (3)