sscanf2 array of strings help. -
PHP код:
new var[MAX_PLAYERS][10][32];
new var2[MAX_PLAYERS][10];
public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
new var3[256];
format(var3, 256, "None,None,None,None,None,None,None,None,None,None,3,4,1,3,5,0,0,4,6,0");
sscanf(var3, "p<,>a<s[4]>[10]a<i>[10]", var[0], var2[0]);
for(new i =0 ; i<10;i++)
printf("var %d = %s, %d", i, var[0][i], var2[0][i]);
return 1;
}
The code above would not insert the strings into the array, it will just remain empty. But if I replace the sscanf to
It would work with the 600 as expected length of string.
Re: sscanf2 array of strings help. -