Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

problem with dialog and query

$
0
0
The dialog doesn't appear and I have checked the logs, query is working.

Code:

stock DisplayGroupMembers(groupid, playerid)
{
    new query[1256], string[128];
    format(string, sizeof(string), "Squad Members for %s(ID:%d)", groupinfo[groupid][grname], groupid);
        mysql_format(c_handle, query, sizeof(query), "SELECT * FROM `users` WHERE `pGroup` = %d", groupid);
        mysql_query(c_handle, query, true);
        format(query, sizeof(query), "{FFFFFF}");
        new count = cache_num_rows();
        if(count > 0)
        {
                new TempString[MAX_PLAYER_NAME], tempid;
                for(new r = 0; r < count; r++)
                {
                        cache_get_field_content(r, "User", TempString);
                        tempid = GetID(TempString);
                        format(query, sizeof(query), "%s%d. %s ", query, (r+1), TempString);
                        if(IsPlayerConnected(tempid))
                        strcat(query, "{FE9A2E}(ONLINE) ");
                        else
                                strcat(query, "{FF0000}(OFFLINE) ");
                               
                        if(cache_get_field_content_int(r, "pGroupLevel") == 5)
                        {
                                strcat(query, "{58D3F7} (Leader) ");
                        }
                        else if(cache_get_field_content_int(r, "pGroupLevel") == 4)
                        {
                                strcat(query, "{58D3F7} (Co Leader) ");
                        }
                        else if(cache_get_field_content_int(r, "pGroupLevel") == 3)
                        {
                                strcat(query, "{58D3F7} (Managing Member) ");
                        }
                        else if(cache_get_field_content_int(r, "pGroupLevel") == 2)
                        {
                                strcat(query, "{58D3F7} (Veteran Member) ");
                        }
                        else if(cache_get_field_content_int(r, "pGroupLevel") == 1)
                        {
                                strcat(query, "{58D3F7} (Member) ");
                        }
                        strcat(query, "\n{FFFFFF}");
                  }
                return ShowDialog(playerid, Show:GroupMembersDia, DIALOG_STYLE_LIST, string, query, "Select", "Close");
        }
        return 1;
}

log

Code:

[13:11:09] [DEBUG] mysql_format - connection: 1, len: 1256, format: "SELECT * FROM `users` WHERE `pGroup` = %d"
[13:11:09] [DEBUG] mysql_query - connection: 1, query: "SELECT * FROM `users` WHERE `pGroup` = 3", use_cache: true
[13:11:09] [DEBUG] CMySQLQuery::Execute - starting query execution
[13:11:09] [DEBUG] CMySQLQuery::Execute - query was successfully executed within 0.887 milliseconds
[13:11:09] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[13:11:09] [DEBUG] CMySQLHandle::SaveActiveResult - cache saved (id: 1)
[13:11:09] [DEBUG] cache_get_row_count - connection: 1
[13:11:09] [DEBUG] cache_get_field_content - row: 0, field_name: "User", connection: 1, max_len: 24
[13:11:09] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "User", data: "Heller"
[13:11:09] [DEBUG] cache_get_field_content_int - row: 0, field_name: "pGroupLevel", connection: 1
[13:11:09] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "pGroupLevel", data: "5"


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>