04.06.2017, 04:26
Hi everyone,
I'm trying to use iterator with string. But I have a problem with string's array size. For example; I'm adding a value to iterator, at the same time changing the value of the string that have ID with the same as iterator value.
Like;
If i set the size of string array to MAX_PLAYERS, it will be too large. I want that the strings array as large as Iterators current size. How can i do it?
Or is there any way to make something like string Iterator?
For example;
I'm trying to use iterator with string. But I have a problem with string's array size. For example; I'm adding a value to iterator, at the same time changing the value of the string that have ID with the same as iterator value.
Like;
PHP код:
new Iterator:myiter<MAX_PLAYERS>, mystr[size][24];
new id = Iter_Free(myiter);
Iter_Add(myiter, id);
format(mystr[id], 24, "%s", pName(playerid));
Or is there any way to make something like string Iterator?
For example;
PHP код:
Iter_Add(myiter, "test");