Getting number from a list GUI
#1

Hi there.
I've got some problem with getting number from a list GUI.
I'll show you parts of script.
ShowPlayerDialog:
pawn Код:
mysql_query( "SELECT `uid`, `text` FROM `CrazyThings`" );
mysql_store_result( );
new    
    big_str[ 1024 ], res[ 200 ],
    id, text[ 128 ]
;
while( mysql_fetch_row ( res ) )
{
    sscanf( res, "p<|>i", id );
    sscanf( res, "p<|>is[128]", id, text );
    format( big_str, sizeof( big_str ), "%s%d.\t%s\n", big_str, id, text );
}
mysql_free_result( );
ShowPlayerDialog(playerid, DIALOG_NUMBER, DIALOG_STYLE_LIST, "Some crazy shit",
big_str, "Read", "Close" );
OnDialogResponse:
pawn Код:
if( dialogid == DIALOG_NUMBER )
{
    if(response)
    {
        new
            kid = strval( inputtext )
        ;
        printf( "KID: %d ", kid );
    }
}
Always prints 'KID: 0' and drives me mad...
I don't know why, because in other dialogs like this it works fine...
Could somebody help?
Reply


Messages In This Thread
Getting number from a list GUI - by Feverlander - 26.04.2011, 10:52
Re: Getting number from a list GUI - by Feverlander - 26.04.2011, 15:16

Forum Jump:


Users browsing this thread: 1 Guest(s)