Raised This Month: $32 Target: $400
 8% 

Problem - Current result set has no fetched rows / plugin.sp::T_LoadData


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode