What I'm trying to do is
pawn Код:
function()
{
new rnd = random(1000);
new array[rnd],
string[1 + rnd * 2],
tempstring[6];
for(new i; i<rnd; i++)
{
format(tempstring, sizeof(tempstring), "%d,", i);
strcat(string, tempstring);
}
sscanf(string, "p<,>a<i>[?]", array);
}
For now I'm formatting the "p<,>a<i>[?]" before using it, are there an easier way of doing this ?
NOTE: apparently this code doesn't compile because an array takes a constant value, but you should get my point(if I edited the define/array size I would have to manually edit the size in the format).