SA-MP Forums Archive
dialog doesnt show up - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: dialog doesnt show up (/showthread.php?tid=644204)



dialog doesnt show up - bogushas - 05.11.2017

The prints are showing up, but dialog doesnt pop up.

PHP код:
new dString[200], dStCat[200*MAX_ACTORS_HISTORY], dokass[50];
        
format(dString160"Vardas\tPatirtis / lygis \tPinigш sk.\tTurimi dokumentai\n");
        
strcat(dStringdStCat);
        for (new 
jMAX_ACTORS_HISTORY++){
            switch(
historyActors[j][Docs]){
                case 
0dokass "neturi jokiш dokumentш";
                case 
1dokass "turi B kat. teises";
                case 
2dokass "turi tik sveikatos paюymа";
                case 
3dokass "turi B kat. teises ir sveikatos paюymа";
            }
            
format(dString160"%s\t%d / %d\t%d\t%s\n"historyActors[j][NameActor], historyActors[j][Experience], historyActors[j][Level], historyActors[j][Money], dokass);
            
strcat(dStringdStCatsizeof(dString));
            
printf"%s\t%d / %d\t%d\t%s\n"historyActors[j][NameActor], historyActors[j][Experience], historyActors[j][Level], historyActors[j][Money], dokass);
        }
        
ShowPlayerDialog(playerid3DIALOG_STYLE_TABLIST_HEADERS"Istorijos pasirinkimas"dStCat"Rinktis""");
        
printf("dialogas?"); 



Re: dialog doesnt show up - AlexMSK - 05.11.2017

Код:
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_TABLIST_HEADERS, "Istorijos pasirinkimas", dStCat, "Rinktis", "");
change to
Код:
#define DIALOG_INFO
ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_TABLIST_HEADERS, "Istorijos pasirinkimas", dStCat, "Rinktis", "");



Re: dialog doesnt show up - Sew_Sumi - 05.11.2017

Quote:
Originally Posted by AlexMSK
Посмотреть сообщение
change to
That won't do anything, all you're doing is changing the DialogID from 3, to DIALOG_INFO... Please, don't guess on this sort of thing.


Re: dialog doesnt show up - Konstantinos - 05.11.2017

dStCat is empty and a dialog isn't shown if the main body is empty.

pawn Код:
format(dString, 160, "%s\t%d / %d\t%d\t%s\n", historyActors[j][NameActor], historyActors[j][Experience], historyActors[j][Level], historyActors[j][Money], dokass);
strcat(dString, dStCat, sizeof(dString));
needs to be:
Код:
format(dStCat, 160, "%s\t%d / %d\t%d\t%s\n", historyActors[j][NameActor], historyActors[j][Experience], historyActors[j][Level], historyActors[j][Money], dokass); 
strcat(dString, dStCat, sizeof(dString));
You can also assign directly text to a string like this:
pawn Код:
dString = "Vardas\tPatirtis / lygis \tPinigш sk.\tTurimi dokumentai\n";
Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
That won't do anything, all you're doing is changing the DialogID from 3, to DIALOG_INFO... Please, don't guess on this sort of thing.
Not only that, but would also give errors (he forgot the number).