[18:48:38] [debug] #1 000f75dc in OnQueryFinish () from LGRP.amx [18:48:38] [debug] #0 ?? in native mysql_fetch_field_row () from mysql.so [18:48:38] [debug] Backtrace (most recent call first): [18:48:38] [debug] Server crashed while executing LGRP.amx |
//found in your query result processing code
switch(resultid)
{
case THREAD_USERNAME_LOOKUP:
{
// We need to store the result in memory. This may be multiple rows, or 1, or even none. But we haven't checked yet, but we can now.
mysql_store_result(connectionHandle);
if(mysql_num_rows(connectionHandle) > 0)
{
//found in your query result processing code
switch(resultid)
{
case THREAD_USERNAME_LOOKUP:
{
// We need to store the result in memory. This may be multiple rows, or 1, or even none. But we haven't checked yet, but we can now.
mysql_store_result(connectionHandle);
/*
if(mysql_num_rows(connectionHandle) > 0)
{
//Found in your query processing code
// We're setting the status to 2 here. The player hasn't logged in yet, but we're getting the information now so we don't have to later.
PlayerInfo[extraid][pStatus] = 2;
// In most languages, using mysql_free_result can seem insignificant. However, in PAWN, with the plugins we have available, the best thing to do is to use this when you've finished
// with some data from MySQL. You only need to use mysql_free_result when you're dealing with SELECT queries or any other query that is designed to return information.
mysql_free_result(connectionHandle);
format(szMessage, sizeof(szMessage), "SERVER: This account (%s) is registered. Please enter the account password to login, otherwise please pick another name.", PlayerInfo[extraid][pUsername]);
SendClientMessage(extraid, COLOR_YELLOW, szMessage);
format(string,sizeof(string), "Welcome to Liberation Group Roleplay, %s.\n\nIP: %s\n\nThe account you are using is registered, please enter your password to login.", GetPlayerNameEx(extraid), PlayerInfo[extraid][pIP]);
ShowPlayerDialog(extraid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"{0049FF}Liberation Group Roleplay Login", string,"Login","Quit");
}
//Found in your query processing code
// We're setting the status to 2 here. The player hasn't logged in yet, but we're getting the information now so we don't have to later.
PlayerInfo[extraid][pStatus] = 2;
*/
// In most languages, using mysql_free_result can seem insignificant. However, in PAWN, with the plugins we have available, the best thing to do is to use this when you've finished
// with some data from MySQL. You only need to use mysql_free_result when you're dealing with SELECT queries or any other query that is designed to return information.
mysql_free_result(connectionHandle);/*
format(szMessage, sizeof(szMessage), "SERVER: This account (%s) is registered. Please enter the account password to login, otherwise please pick another name.", PlayerInfo[extraid][pUsername]);
SendClientMessage(extraid, COLOR_YELLOW, szMessage);
format(string,sizeof(string), "Welcome to Liberation Group Roleplay, %s.\n\nIP: %s\n\nThe account you are using is registered, please enter your password to login.", GetPlayerNameEx(extraid), PlayerInfo[extraid][pIP]);
ShowPlayerDialog(extraid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"{0049FF}Liberation Group Roleplay Login", string,"Login","Quit");
*/
SendClientMessage(extraid,0xFF0000FF,"Test complete. Query ran without crash");
}
if(mysql_num_rows(connectionHandle) > 0)
{
mysql_retrieve_row();
new szReturn[128];
mysql_fetch_field_row(PlayerInfo[extraid][pPass], "Password", connectionHandle);
/*
mysql_fetch_field_row(szReturn, "ID", connectionHandle);
PlayerInfo[extraid][pDBID] = strval(szReturn);