SA-MP Forums Archive
Server crashes [Name lenght] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Server crashes [Name lenght] (/showthread.php?tid=246729)



Server crashes [Name lenght] - Arcanize - 05.04.2011

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.


Re: Server crashes [Name lenght] - Unknown123 - 05.04.2011

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


I thought max name lenght was 20?


Re: Server crashes [Name lenght] - Jeffry - 05.04.2011

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.


Re: Server crashes [Name lenght] - Arcanize - 05.04.2011

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


Re: Server crashes [Name lenght] - randomkid88 - 05.04.2011

MAX_PLAYER_NAME is defined as 24.


Re: Server crashes [Name lenght] - Blacklite - 05.04.2011

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.


Re: Server crashes [Name lenght] - Arcanize - 07.04.2011

Thanks. Problem resolved.


Re: Server crashes [Name lenght] - Calgon - 07.04.2011

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.


Re: Server crashes [Name lenght] - Arcanize - 22.06.2011

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


Re: Server crashes [Name lenght] - Arcanize - 22.06.2011

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!