Little request for 'FOR'()
#2

Try this

pawn Код:
new str[250], key[10]; //might need to increase this, depending on the file value's
for(new x=0; x<=2; x++) //Loop 3 times
{
    format(key, sizeof(key), "item%d", x+1); //format the key to read from
    if(strlen(DOF2_GetString(User, key, "ITEMS")) > 0) format(str, sizeof(str), "%s%s\n", str, DOF2_GetString(User, key, "ITEMS")); //If the file value isn't empty, format the string with the file value
    else continue; //if the file value is empty, continue the loop.
}
Reply


Messages In This Thread
Little request for 'FOR'() - by Micheal_ - 13.07.2011, 13:55
Re: Little request for 'FOR'() - by PotH3Ad - 13.07.2011, 19:00
Re: Little request for 'FOR'() - by Micheal_ - 13.07.2011, 19:47
Re: Little request for 'FOR'() - by PotH3Ad - 14.07.2011, 02:04
Re: Little request for 'FOR'() - by Micheal_ - 14.07.2011, 08:14
Re: Little request for 'FOR'() - by PotH3Ad - 14.07.2011, 08:31

Forum Jump:


Users browsing this thread: 1 Guest(s)