[Tutorial] String Formatting
#26

Quote:
Originally Posted by krogsgaard20
View Post
The reason for using "23 + MAX_PLAYER_NAME" and not 128 is because the smaller array sizes, the better. 128 is way too much for our small message in this tutorial. Allways make arrays as small as possible.
Quote:
Originally Posted by Toreno
View Post
True, using a 128 array size is over than you need.

@ krogsgaard20,
To be honest, that tutorial taught me alot.
Good tutorial and good job!
You're right that using small arrays will be better instead of setting them to 128, but, will you really going to count every formatted string you send? Don't you two prefer to just guess the maximum string?

Also, I agree with Y_Less, although I don't know what 3 means. But its true that this one would be better:
pawn Code:
new str[64];
GetPlayerName(playerid,str,MAX_PLAYER_NAME);
format(str,sizeof(str),"Hello %s",str);
Reply


Messages In This Thread
String Formatting - by krogsgaard20 - 30.06.2011, 22:55
Re: String Formatting - by grand.Theft.Otto - 01.07.2011, 03:29
Re: String Formatting - by dr.pepper - 01.07.2011, 03:34
Re: String Formatting - by krogsgaard20 - 01.07.2011, 09:34
Re: String Formatting - by Toreno - 01.07.2011, 10:47
Re: String Formatting - by iPLEOMAX - 01.07.2011, 11:05
Re: String Formatting - by Lorenc_ - 01.07.2011, 11:08
Re: String Formatting - by Vince - 01.07.2011, 11:24
Re: String Formatting - by Macluawn - 01.07.2011, 11:25
Re: String Formatting - by krogsgaard20 - 01.07.2011, 15:45
Re: String Formatting - by Mean - 03.07.2011, 17:02
Re: String Formatting - by Calgon - 03.07.2011, 17:03
Re: String Formatting - by Mean - 03.07.2011, 17:14
Re: String Formatting - by [03]Garsino - 03.07.2011, 17:49
Re: String Formatting - by sim_sima - 03.07.2011, 22:22
Re: String Formatting - by [03]Garsino - 03.07.2011, 22:34
Re: String Formatting - by sim_sima - 04.07.2011, 11:15
Re: String Formatting - by cessil - 05.07.2011, 02:35
Re: String Formatting - by SchurmanCQC - 05.07.2011, 02:50
Re: String Formatting - by krogsgaard20 - 05.07.2011, 13:23
Re: String Formatting - by sim_sima - 06.08.2011, 12:32
Re: String Formatting - by sim_sima - 20.10.2011, 20:51
Re: String Formatting - by krogsgaard20 - 08.01.2012, 15:52
Re: String Formatting - by Jessyy - 21.07.2012, 18:49
Re: String Formatting - by cazanova - 26.07.2012, 04:57
Re: String Formatting - by Amit_B - 26.07.2012, 08:33
Re: String Formatting - by Vince - 26.07.2012, 09:23
Re: String Formatting - by Kaperstone - 26.07.2012, 09:40
Re: String Formatting - by Amit_B - 26.07.2012, 10:22
Re: String Formatting - by Madsen - 31.03.2013, 21:54
Re: String Formatting - by ZcvDev - 01.02.2015, 03:46
Re: String Formatting - by JasonRiggs - 27.01.2017, 01:35
Re: String Formatting - by BlackbirdXd - 15.02.2017, 13:19
Re: String Formatting - by RoW001 - 20.03.2017, 17:11
Re: String Formatting - by Eoussama - 15.12.2017, 12:13

Forum Jump:


Users browsing this thread: 7 Guest(s)