argument type mismatch =(
#1

whats wrong? its supposed to show the members list =( :
Код:
if(dialogid == 28)
	    {
	    new p[256];
	    p=LoadMem(playerid);
	    ShowPlayerDialog(playerid, 29,"Members",p,"Ok","Cancel");
	    }
this is loadmem:
Код:
LoadMem(playerid)
{
	new q[128],mem[256];
	format(q,128,"SELECT * FROM ostats WHERE org=%d",org[playerid]);
	mysql_query(q);
	mysql_store_result();
	for(new i=0;i<mysql_num_rows();mysql_retrieve_row())
	    {
	    new tmp[32],s[128],field[3][32];
		mysql_fetch_row_format(q, "|");
        explode(q, field, "|");
		format(tmp,32,"%s",field[1]);
		format(s,128,"%s\n%s",s,tmp);
		format(mem,256,"s",s);
		}
	return mem;
}
Reply
#2

Actually, you forgot to add Dialig Style, i've added Dialog Message Box you can change it if you want to change..
https://sampwiki.blast.hk/wiki/Dialog_Styles

Fixed Code:
pawn Код:
if(dialogid == 28)
{
    new p[256];
    p=LoadMem(playerid);
    ShowPlayerDialog(playerid, 29,DIALOG_STYLE_MSGBOX,"Members",p,"Ok", "Cancel");
}
Reply
#3

ok its fixed but one prob still exists when i enter the cp it shows members option but when i click it, it just closes (doesnt show the members)
Reply
#4

"29" - Make sure you have such a dialog id.
Reply
#5

i dont think thats the prob
Reply
#6

I think it is the problem.
Reply
#7

tested and its not the prob
Reply
#8

Quote:
Originally Posted by THE_KNOWN
Посмотреть сообщение
whats wrong? its supposed to show the members list =( :
pawn Код:
if(dialogid == 28)
{
        ShowPlayerDialog(playerid, 29,DIALOG_STYLE_MSGBOX,"Members",LoadMem(playerid),"Ok","Cancel");
}


LoadMem(playerid)
{
    new q[128];
    format(q,128,"SELECT * FROM ostats WHERE org=%d",org[playerid]); // shouldn't you only select Name or sth?
    mysql_query(q);
    mysql_store_result();
        new s[256],field[3][32];
        new idx=0;
    while(mysql_fetch_row_format(q,"|")
    {
                idx++;
                explode(q, field, "|");
        if(idx==1) format(s,256,"%s",field[1]);
        else format(s,256,"%s\n%s",s,field[1]);
    }
    return s;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)