13.07.2011, 19:00
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.
}