SA-MP Forums Archive
sscanf problem - 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: sscanf problem (/showthread.php?tid=500144)



sscanf problem - ancezas - 11.03.2014

i have this code:
pawn Код:
case 0://Sukurti rangą...
                {
                    new
                        Index,
                        query[ 300 ],
                        query2[ 300 ],
                        str  [ 1200 ];

                    format( query, 200, "SELECT `RID`, `RPavadinimas` FROM `rangai` WHERE `RKint` = '%d'", zInfo[ playerid ][ dyrikz ] );
                    mysql_query( query );
                    mysql_store_result();
                    if ( mysql_num_rows( ))
                    {
                        while( mysql_fetch_row( query2 ))
                        {
                            new
                                id,
                                pavadinimas;

                            sscanf( query2, "ic", id, pavadinimas );
                            format( str, 1200, "%s%i - %s\n", str, id, pavadinimas );
                            Index++;
                        }
                    }
                    mysql_free_result();
                    ShowPlayerDialog( playerid, 311, DIALOG_STYLE_LIST, "{FFFFFF}Rangai", str, "Rinktis", "Atgal" );
                    return true;
                }
and it retruns "id" everywhere in zeros, but Mysql Log showing that it feached good