Problem about nickname
#3

Quote:
Originally Posted by Nubotron
Use function like this
pawn Код:
chrfind(string[], chr, start = 0)
{
  while (string[start])
    if (string[start++] == chr)
      return start - 1;

  return -1;
}
to get position of "_", and use this position + 1 as string index

pawn Код:
new idx = chrfind(playername2, '_') + 1;
printf("%s", playername2[idx]);

can't understand very well this part "new idx = chrfind(playername2, '_') + 1"
what +1 stands for?

edit: i got it now , i'm a lil slow
Reply


Messages In This Thread
Problem about nickname - by Diablo1st - 06.04.2009, 07:47
Re: Problem about nickname - by Nubotron - 06.04.2009, 08:03
Re: Problem about nickname - by Diablo1st - 06.04.2009, 08:06

Forum Jump:


Users browsing this thread: 1 Guest(s)