SA-MP Forums Archive
Why nothing shows me ? - 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: Why nothing shows me ? (/showthread.php?tid=578017)



Why nothing shows me ? - Dutheil - 15.06.2015

Logically, it works. But here, don't

PHP код:
stock DialogParticules(playerid
{     
    new 
        
string[64], 
        
string2[sizeof(string) * sizeof(pInfo) + 1]; 
     
    for(new 
0sizeof(pInfo); i++) 
    { 
        switch(
i
        {         
            case 
FIN_CHAPEAU_TETEFIN_MAINSFIN_FAMILIER: continue; 
            case 
TITRE_CHAPEAU_TETE,  TITRE_MAINS,  TITRE_FAMILIERformat(stringsizeof(string), "%s\n"string_particules[i]); 
            default: 
format(stringsizeof(string), "%s : %s\n"string_particules[i], activate[pInfo[playerid][pInfo_:i]]); 
        } 
         
        print(string); 
         
        
strcat(string2string); 
         
        print(
string2); // Here it works
    

     
    print(
string2); // <--- Here it doesn't work :(
     
    
return Dialog_Show(playeridDialogParticulesDIALOG_STYLE_LIST"Particules & Accessoires"string2"Ok""Fermer"); 




Re: Why nothing shows me ? - Swyft™ - 15.06.2015

pawn Код:
stock DialogParticules(playerid)  
{      
    new  
        string[64],  
        string2[sizeof(string) * sizeof(pInfo) + 1];  
     
    for(new i = 0; i < sizeof(pInfo); i++)  
    {  
        switch(i)  
        {          
            case FIN_CHAPEAU_TETE, FIN_MAINS, FIN_FAMILIER: continue;  
            case TITRE_CHAPEAU_TETE,  TITRE_MAINS,  TITRE_FAMILIER: format(string, sizeof(string), "%s\n", string_particules[i]);  
            default: format(string, sizeof(string), "%s : %s\n", string_particules[i], activate[pInfo[playerid][pInfo_:i]]);  
        }  
         
        print(string);  
         
        strcat(string2, string);  
         
        print(string2);
    }  
     
    print(string2); // How is it going to print string2? You only have it returning something under your for.
     
    return Dialog_Show(playerid, DialogParticules, DIALOG_STYLE_LIST, "Particules & Accessoires", string2, "Ok", "Fermer");  
}
How is it going to print string2? You only have it returning something under your for.


Re : Why nothing shows me ? - Dutheil - 15.06.2015

I found where the problem was, thanks