What is wrong with my code?
#1

So, dialog doesn't read \n as new line from file, so i tried, to seperate names and add \n after all of them.

Код:
    new string[64], str[10][26], sat[64];
    new File:example = fopen("Medarb.txt", io_read);
    fread(example, string);
    fclose(example);
    explode(str, string, "\n");
    for(new d; d<10;d++)
    {
       new stor[26];
       format(stor, 26, "%s\n", str[d]);
       strins(sat, stor, 0);
    }
    ShowPlayerDialog(playerid, 899, DIALOG_STYLE_MSGBOX, "Workers", sat, "Ok", "");
It only inputs:

Код:
(New line)
(New line)
(New line)
(New line)
(New line)
(New line)
Barack_Obama\nSteve_Cardinal
In Medarb.txt:

Код:
Barack_Obama\nSteve_Cardinal
Any solutions?
Reply
#2

Solved...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)