06.01.2010, 10:17
Hey,
Few weeks ago I've asked for a help getting this:
new GangNames [ 4 ] [ 20 ] =
{
"Gang Name 1",
"Gang Name 2",
"Gang Name 3",
"Gang Name 4"
};
from a file (using dini) which returns
"Gang Name 1, Gang Name 2, Gang Name 3, Gang Name 4"
Someone said, that it is possible using this:
But this returns:
Gangs[0] = "Gang"
Gangs[1] = "Name"
Gangs[2] = "1,"
Gangs[3] = " Gang Name 2, Gang Name 3, Gang Name 4"
How can I make it to split strings where , is, but not on every space..?
Few weeks ago I've asked for a help getting this:
new GangNames [ 4 ] [ 20 ] =
{
"Gang Name 1",
"Gang Name 2",
"Gang Name 3",
"Gang Name 4"
};
from a file (using dini) which returns
"Gang Name 1, Gang Name 2, Gang Name 3, Gang Name 4"
Someone said, that it is possible using this:
pawn Код:
new Gangs[4][256];
sscanf(dini_Get("Gangs.info","Gangs"), "ssss", Gangs[0], Gangs[1], Gangs[2], Gangs[3]);
Gangs[0] = "Gang"
Gangs[1] = "Name"
Gangs[2] = "1,"
Gangs[3] = " Gang Name 2, Gang Name 3, Gang Name 4"
How can I make it to split strings where , is, but not on every space..?