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