swap string
#5

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
@xVIP3Rx: That would only replace 1...

You should do it like this:

PHP код:
for(new i=strfind(Player_RName[playerid] , "_"); i!=-1i=strfind(Player_RName[playerid],"_",false,i+1))
{
    
Player_RName[playerid][i] = ' ';

You're right, though I don't think that loop is correct, kinda confusing me

does yours code do the same as
pawn Код:
new i;
while( i != -1 )
{
    i = strfind(Player_RName[playerid] , "_");

    if(pos != -1) Player_RName[playerid][pos] = ' ';
}
?
Reply


Messages In This Thread
swap string - by CodeBreaker - 01.08.2015, 18:53
Re: swap string - by xVIP3Rx - 01.08.2015, 19:07
AW: swap string - by Kaliber - 01.08.2015, 19:10
Re: swap string - by CodeBreaker - 01.08.2015, 19:14
Re: AW: swap string - by xVIP3Rx - 01.08.2015, 19:22
AW: Re: AW: swap string - by Kaliber - 01.08.2015, 19:24
Re: AW: Re: AW: swap string - by xVIP3Rx - 01.08.2015, 19:47

Forum Jump:


Users browsing this thread: 1 Guest(s)