Quote:
Originally Posted by GetRektByNoob
afaik you are trying to find the field index but the result is not fetched try doing
Code:
//If a row set was returned:
if(results.FetchRow())
{
int valoareCol;
results.FieldNameToNum("valoare", valoareCol);
valoare[client] = results.FetchInt(valoareCol);
}
else
{
//not found in db, insert data:
char steamid[32]; GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
char query[256]; Format(query, sizeof(query), "INSERT INTO jailbreak_test (steamid) VALUES ('%s') ON DUPLICATE KEY UPDATE steamid = '%s';", steamid, steamid);
db.Query(T_Generic, query);
}
|
Now I'm getting this error:
Code:
L 08/21/2019 - 01:46:35: [SM] Exception reported: No current result set
L 08/21/2019 - 01:46:35: [SM] Blaming: testNewDb.smx
L 08/21/2019 - 01:46:35: [SM] Call stack trace:
L 08/21/2019 - 01:46:35: [SM] [0] DBResultSet.FetchRow
L 08/21/2019 - 01:46:35: [SM] [1] Line 84, testNewDb.sp::T_LoadData