#πŸ”’ making an online test game with ursina engine and socket

4 messages Β· Page 1 of 1 (latest)

glacial plover
#

So I am trying to make an online game, just as a test so ik how to do it next time.
All code:
Client: https://srcb.in/vxPAOFhx8I
Server: https://srcb.in/fTm3tgaOwQ

Server Errors:

C:\Users\Ethan\Desktop\Ursina\online game\.venv>python main.py
Enter server host >> 127.0.0.1
Traceback (most recent call last):
  File "C:\Users\Ethan\Desktop\Ursina\online game\.venv\main.py", line 21, in <module>
    conn(host_ip)
  File "C:\Users\Ethan\Desktop\Ursina\online game\.venv\main.py", line 13, in conn
    p_loc = player_box.position
            ^^^^^^^^^^
NameError: name 'player_box' is not defined

Client Errors:

C:\Users\Ethan\Desktop\Ursina\online game\.venv>python server.py
Server open on 169.254.196.236:5002
Connection from ('127.0.0.1', 57703)
Traceback (most recent call last):
  File "C:\Users\Ethan\Desktop\Ursina\online game\.venv\server.py", line 15, in <module>
    if data.split("#")[0] == "[LOC]":
       ^^^^^^^^^^^^^^^
TypeError: a bytes-like object is required, not 'str'

Someone please help : D

rancid cragBOT
#

@glacial plover

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

rancid cragBOT
#

@glacial plover

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.