Hello, I know that the size of an array must be defined by a constant, but is there any way to define the size based on a parameter or another array?
stock GetStringPreview(string[],maxlength=25)
{
new preview,len;
format(preview,maxlength,"%s",string);
if(strlen(string) > maxlength)
{
len = strlen(preview);
strins(preview, "...",((preview == ' ') ? len-1 : len));
}
return preview;
}