AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   wich is better format() or formatex() ? (https://forums.alliedmods.net/showthread.php?t=127824)

#8 SickneSS 05-25-2010 09:46

wich is better format() or formatex() ?
 
-title-

DruGzOG 05-25-2010 09:49

Re: wich is better format() or formatex() ?
 
I'm pretty sure someone else has posted a discussion on this before.

Search for it, the topic goes in depth in which is better and why.

#8 SickneSS 05-25-2010 09:59

Re: wich is better format() or formatex() ?
 
Thanks,I found them.
formatex() is better

jim_yang 05-25-2010 10:09

Re: wich is better format() or formatex() ?
 
no better but suitable

Arkshine 05-25-2010 10:12

Re: wich is better format() or formatex() ?
 
formatex() is faster then format() but you can't use it always in all cases : http://wiki.amxmodx.org/Optimizing_P...ting)#FormatEX

#8 SickneSS 05-25-2010 10:35

Re: wich is better format() or formatex() ?
 
I understand,I ussing it in a say message

fysiks 05-25-2010 15:06

Re: wich is better format() or formatex() ?
 
Quote:

Originally Posted by #8 SickneSS (Post 1190686)
I understand,I ussing it in a say message

It doesn't matter where you use it. It only matter what variables you are using as arguments.

Bugsy 05-26-2010 08:54

Re: wich is better format() or formatex() ?
 
formatex()
Code:

Same as format(), except does not perform a "copy back" check.
This means formatex() is faster, but DOES NOT ALLOW this type of call:
formatex(buffer, len, "%s", buffer)
formatex(buffer, len, buffer, buffer)
formatex(buffer, len, "%s", buffer[5])
This is because the output is directly stored into "buffer", rather than copied back at the end.



All times are GMT -4. The time now is 05:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.