12.07.2011, 21:12
Try this. Make sure you are using the file functions correctly and make sure you are formatting the string that stores the file directory.
pawn Код:
new items[250], key[8];
//Make sure you are formatting the "User" string before this
//-format(User, sizeof(User), USER_FILE, pName); //replace with ur file code..
for(new x=0; x<3; x++) //Starts with 0. (Loop 0-2)
{
format(key, sizeof(key), "item%d", x+1);
format(items, sizeof(items), "%s%s\n", items, DOF2_GetString(User, key, "ITEMS")); //Continue formatting the string with the file value's until the loop ends
}
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "List", items, "Go", "Cancel");