View Single Post
Author Message
Lines08
Junior Member
Join Date: Sep 2014
Old 05-21-2019 , 17:11   Problem - Current result set has no fetched rows / plugin.sp::T_LoadData
Reply With Quote #1

Don't know what im doing wrong. for some reason it gives me this as error:

Code:
L 05/21/2019 - 22:56:06: [SM] Exception reported: Current result set has no fetched rows
L 05/21/2019 - 22:56:06: [SM] Blaming: sm.smx
L 05/21/2019 - 22:56:06: [SM] Call stack trace:
L 05/21/2019 - 22:56:06: [SM]   [0] SQL_FetchInt
L 05/21/2019 - 22:56:06: [SM]   [1] Line 151, plugin.sp::T_LoadData
line 151 is blank and has nothing in it

Source:

PHP Code:
...
public 
void OnClientPutInServer(int client)
{
    if(!
IsFakeClient(client) && g_Database != null)
    {
        
char query[256], steamid[32];
        
GetClientAuthId(clientAuthId_SteamID64steamidsizeof(steamid));
        
FormatEx(querysizeof(query), "SELECT * FROM userliste WHERE steam_id = '%s'"steamid);
        
SQL_TQuery(g_DatabaseT_LoadDataqueryGetClientUserId(client));
    }
}

public 
void T_LoadData(Handle ownerHandle results, const char[] errorany data)
{
    if(
owner == null || results == null)
    {
        
LogError("T_LoadData returned error: %s"error);
        return;
    }

    
int client GetClientOfUserId(data);

    if (
client == 0)
    {
      return;
    }
    
    
int playerRank;
    
int playerTwitchName;
    
SQL_FieldNameToNum(results"csgorank"playerRank);
    
SQL_FieldNameToNum(results"twitch_name"playerTwitchName);
    
    if(
SQL_FetchRow(results))
    {
      
g_iRank[client] = SQL_FetchInt(resultsplayerRank);
      
int userTwitchName SQL_FetchInt(resultsplayerTwitchName);
      
      
char name[32];
      
GetClientName(clientnamesizeof(name));
      
      
char alias[32];
      
Format(aliassizeof(alias), "[%s] %s"userTwitchNamename);
      
SetClientName(clientalias);
    }
    else
    {
      
PrintToChat(client"Could not find you in the DB.");
      return;
    }
}
... 



what is wrong?

Last edited by Lines08; 05-21-2019 at 18:08.
Lines08 is offline