Posts: 64
Threads: 13
Joined: Nov 2010
Reputation:
0
Hey!
I have a problem with OnPlayerConnect & OnPlayerLogin public.
If player's name is bigger than ~(About) 20-22 marks, then the server crashes.
Idea? Post here. Thanks.
Your saying when someone with name longer than 20 carachers join then server crash?
I thought max name lenght was 20?
Posts: 1,594
Threads: 61
Joined: Oct 2009
Reputation:
0
There is probably a bug in your OnPlayerConnect or in your OnPlayerLogin.
Try to run a empty gamemode and test it there.
If it is working there, go over the callbacks again.
Posts: 64
Threads: 13
Joined: Nov 2010
Reputation:
0
Yep, it's 20. But my server says that only then,when name is more than 25 marks...
Posts: 308
Threads: 17
Joined: Mar 2010
Reputation:
0
MAX_PLAYER_NAME is defined as 24.
Posts: 412
Threads: 20
Joined: Mar 2009
Reputation:
0
Do some debugging. Maybe print()'s in each callback, and just narrow it down till you find it. If it ALWAYS happens with names of that length, then it should be easy to find, and you will probably be able to just test it locally.
Posts: 64
Threads: 13
Joined: Nov 2010
Reputation:
0
Thanks. Problem resolved.
Posts: 6,129
Threads: 36
Joined: Jan 2009
For the record: MAX_PLAYER_NAME is defined as 24, you can change your name once connected to something that exceeds 24 characters, but players can only connect with names that are under ~20 characters, from what I recall.