17.04.2015, 21:30
Well.. The code Isn't really easy.
But here is a tip:
Strings are actually arrays.. Meaing that the variable: string[5] which lets say equals "Johny" will look like :
So to loop through the character you can use:
Using the same code above... detect the pos of { and the pos of } and than delete all chars between them.
But here is a tip:
Strings are actually arrays.. Meaing that the variable: string[5] which lets say equals "Johny" will look like :
Код:
0 - J 1 - O 2 - H 3 - N 4 - Y 5 - \0 (The NULL.)
pawn Код:
for(new i; i < strlen(string); i++)
{
if(string[i] == 'CHAR HERE')
{
//CODE HERE
}
}