Server crashes [Name lenght]
#1

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.
Reply
#2

Your saying when someone with name longer than 20 carachers join then server crash?


I thought max name lenght was 20?
Reply
#3

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.
Reply
#4

Yep, it's 20. But my server says that only then,when name is more than 25 marks...
Reply
#5

MAX_PLAYER_NAME is defined as 24.
Reply
#6

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.
Reply
#7

Thanks. Problem resolved.
Reply
#8

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.
Reply
#9

Problem is not solved.

How can I check does player name is ~18(I defined to 1

#undef MAX_PLAYER_NAME
#define MAX_PLAYER_NAME 18
Reply
#10

Double, but it's hurry!

I debuged my OnPlayerConnect & OnPlayerLogin publics. Only OnPlayerconnect can be loaded. Here's the question.

"What public is next to OnPlayerConnect?" - OnPlayerlogin? It even doesn't work (Debug)

Quote:

[17:15:26] Incoming connection: 5.86.165.200:49187
[17:15:26] [join] Kwalhioqua_Kittequaw has joined the server (0:5.86.165.200)
[17:15:26] Con: 1.1
[17:15:26] Con: 1.2
[17:15:26] Con: 1.3
[17:15:26] Con: 1.4
[17:15:26] Con: 1.5
[17:15:26] Con: 1.6
[17:15:26] Con: 1.7
[17:15:26] Con: 1.8
[17:15:26] Con: 2.1
[17:15:26] Con: 2.2
[17:15:26] Con: 2.3

IT'S ONPLAYERCONNECT DEBUG!

Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)