[Tutorial] How to write readable and maintainable code
#14

Quote:
Originally Posted by NaS
Посмотреть сообщение
This bugs me even more, make it MAX_PLAYER_NAME + 1 since a name can be 24 characters, but in PAWN we have a string terminator...
Theoretically , even that is uneccessary (not in all cases), because:

Quote:

A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name.

So, if you don't use SetPlayerName, you can actually use a size of 20 + null terminator.
Correct if i am wrong :P
Reply


Messages In This Thread
How to write readable and maintainable code - by BiosMarcel - 11.12.2016, 16:42
Re: How to write readable and maintainable code - by Vince - 11.12.2016, 17:01
Re: How to write readable and maintainable code - by BiosMarcel - 11.12.2016, 17:08
Re: How to write readable and maintainable code - by Eoussama - 11.12.2016, 17:10
Re: How to write readable and maintainable code - by BiosMarcel - 11.12.2016, 17:14
Re: How to write readable and maintainable code - by Vin Diesel - 11.12.2016, 17:21
Re: How to write readable and maintainable code - by coool - 12.12.2016, 16:27
Re: How to write readable and maintainable code - by X3nZ - 14.12.2016, 03:35
Re: How to write readable and maintainable code - by Swedky - 14.12.2016, 03:53
Re: How to write readable and maintainable code - by BiosMarcel - 14.12.2016, 05:18
Re: How to write readable and maintainable code - by iLearner - 14.12.2016, 05:32
Re: How to write readable and maintainable code - by GoldenLion - 14.12.2016, 05:37
Re: How to write readable and maintainable code - by NaS - 24.12.2016, 10:04
Re: How to write readable and maintainable code - by BiosMarcel - 24.12.2016, 10:24
Re: How to write readable and maintainable code - by NaS - 24.12.2016, 10:38
Re: How to write readable and maintainable code - by BiosMarcel - 24.12.2016, 10:47
Re: How to write readable and maintainable code - by BiosMarcel - 24.12.2016, 11:01
Re: How to write readable and maintainable code - by Luicy. - 24.12.2016, 11:02
Re: How to write readable and maintainable code - by BiosMarcel - 24.12.2016, 11:05

Forum Jump:


Users browsing this thread: 1 Guest(s)