SA-MP Forums Archive
Setting a string's length using integers - 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: Setting a string's length using integers (/showthread.php?tid=384581)



Setting a string's length using integers - fordawinzz - 12.10.2012

Is is possible to set a string's length using integers? Like this:
Код:
new szString[CheckTotalAccounts() * 50];
the CheckTotalAccounts function returns an integer.


Re: Setting a string's length using integers - Kyle - 12.10.2012

You cannot do this due to the variables are created at the very start of the gamemode and when it's not ran so therefore it cannot execute the function to grab the data.

Put in an array size of something you think it would be near to.