View Single Post
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 05-20-2017 , 08:26   Re: Two question about sp syntax
Reply With Quote #8

Quote:
Originally Posted by WilliamDG View Post
Ok, i have tested the dynamic array thing.
It work perfectly and i thank you for quick reply!

Only a little question, if i'm in this situation:

PHP Code:
ConVar myConvar;


myConvar CreateConVar("sm_myArraySize" etc etc...)
char[] myArray = new char[myConvar.IntValue]; 
and after i want use the sizeoff command to get the length it give me an error so i supposed to use again the myConvar.IntValue

My question is: There is another way to get the sizeoff or this is the only way to get the dynamic array length?

Thank you again guys!!!
You have no choice but do:
Code:
int iSize = myConvar.IntValue; char[] myArray = new char[iSize]; Format(myArray, iSize, "%s%s",something, something2);
__________________
Benoist3012 is offline