Quick question regarding string sizes - 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)
+--- Thread: Quick question regarding string sizes (
/showthread.php?tid=476777)
Quick question regarding string sizes -
Voxel - 20.11.2013
What is the difference between having a variable that is to large like
pawn Код:
new string[1000];
//using the string here like to display "Hello" (wich is only 5 digits long)
you guys get what i mean.. so my question is like does this impact the performence or anything or ...?
thanks
Re: Quick question regarding string sizes -
newbie scripter - 20.11.2013
more size in string == more size in file == LAG.
Here is ****** 's topic
Click Me
Re: Quick question regarding string sizes -
Djole1337 - 20.11.2013
Quote:
Originally Posted by Voxel
What is the difference between having a variable that is to large like
pawn Код:
new string[1000]; //using the string here like to display "Hello" (wich is only 5 digits long)
you guys get what i mean.. so my question is like does this impact the performence or anything or ...?
thanks
|
Why would you use 1k large string when your 'Hello' string takes just 5 cells + NULL terminator. Using 1k large string for something that takes just 6 cells is just retarded.
Re: Quick question regarding string sizes -
Voxel - 20.11.2013
Quote:
Originally Posted by Djole1337
Why would you use 1k large string when your 'Hello' string takes just 5 cells + NULL terminator. Using 1k large string for something that takes just 6 cells is just retarded.
|
It was just as a example