Moin Moin!
ich habe in MySQL R40 das Problem, das der Query nicht ausgeführt bzw. das der Public wird Ausgeführt.
Habe es schon mal Geprint, der Public wird einfach nicht Gestartet.
Zeige euch mal den Code.
public OnPlayerConnect(playerid)
{
ResetSpielerDatei(playerid);
if(!sInfo[playerid][sEingeloggt])
{
new query[128];
mysql_format(Handle, query, sizeof(query), "SELECT `id` FROM users WHERE `Spielername` = '%e'", sInfo[playerid][sName]);
mysql_pquery(Handle, query, "OnUserCheck", "d", playerid);
print("OnPlayerConnect - Complete");
}
return 1;
}
Der Print wird mir Angezeigt, aber der Print bei "OnUserCheck" zB nicht.
public OnUserCheck(playerid)
{
print("OnUserCheck - Now");
new rows;
cache_get_row_count(rows);
if(rows == 0)
{
print("dialogid");
ShowPlayerDialog(playerid, DIALOG_REGISTRATION, DIALOG_STYLE_PASSWORD, "Registration", "Registriere dich", "OK", "Nein");
return 1;
}
else
{
ShowPlayerDialog(playerid, DIALOG_EINLOGGEN, DIALOG_STYLE_PASSWORD, "Login", "Log dich ein", "OK", "Nein");
return 1;
}
print("OnUserCheck - End");
return 1;
}
Habe auch noch hier die MySQL Log für euch.
[16:21:33] [DEBUG] mysql_connect("127.0.0.1", "root", "*****", "samp_db", 0)
[16:21:33] [DEBUG] CHandleManager::Create(this=0x69c560, host='127.0.0.1', user='root', pass='****', db='samp_db', options=0x69d8c0)
[16:21:33] [INFO] Creating new connection handle...
[16:21:33] [DEBUG] CConnection::CConnection(this=0x6a1768, host='127.0.0.1', user='root', passw='****', db='samp_db', options=0x69d8c0)
[16:21:33] [DEBUG] CConnection::CConnection - new connection = 0x2912878
[16:21:33] [DEBUG] CConnection::CConnection(this=0x2a27020, host='127.0.0.1', user='root', passw='****', db='samp_db', options=0x69d8c0)
[16:21:33] [DEBUG] CConnection::CConnection - new connection = 0x38c00b8
[16:21:33] [DEBUG] CThreadedConnection::WorkerFunc(this=0x2a27020, connection=0x2a27020)
[16:21:33] [DEBUG] CThreadedConnection::CThreadedConnection(this=0x2a27020, connection=0x2a27020)
[16:21:33] [DEBUG] CConnectionPool::CConnectionPool(size=2, this=0x6a1728)
[16:21:33] [DEBUG] CConnection::CConnection(this=0x3ab7020, host='127.0.0.1', user='root', passw='****', db='samp_db', options=0x69d8c0)
[16:21:33] [DEBUG] CConnection::CConnection - new connection = 0x38c8b20
[16:21:33] [DEBUG] CThreadedConnection::WorkerFunc(this=0x3ab7020, connection=0x3ab7020)
[16:21:33] [DEBUG] CThreadedConnection::CThreadedConnection(this=0x3ab7020, connection=0x3ab7020)
[16:21:33] [DEBUG] CConnection::CConnection(this=0x3c44020, host='127.0.0.1', user='root', passw='****', db='samp_db', options=0x69d8c0)
[16:21:33] [DEBUG] CConnection::CConnection - new connection = 0x38d4bb0
[16:21:33] [DEBUG] CThreadedConnection::WorkerFunc(this=0x3c44020, connection=0x3c44020)
[16:21:33] [DEBUG] CThreadedConnection::CThreadedConnection(this=0x3c44020, connection=0x3c44020)
[16:21:33] [INFO] Connection handle with id '1' successfully created.
[16:21:33] [DEBUG] CHandleManager::Create - new handle = 0x68e7a0
[16:21:33] [DEBUG] mysql_errno(1)
[16:21:33] [DEBUG] CHandle::GetErrorId(this=0x68e7a0)
[16:21:33] [DEBUG] CConnection::GetError(this=0x6a1768, connection=0x2912878)
[16:21:33] [DEBUG] CHandle::GetErrorId - return value: true, error id: '0', error msg: ''
[16:22:18] [DEBUG] mysql_format(1, 0x02D6A5B0, 128, "SELECT `id` FROM users WHERE `Spielername` = '%e'")
[16:22:18] [DEBUG] mysql_pquery(1, "", "OnUserCheck", "d")
[16:22:18] [DEBUG] CCallback::Create(amx=0x29a36b8, name='OnUserCheck', format='d', params=0x2d6a598, param_offset=5)
[16:22:18] [DEBUG] CCallback::Create - callback index for 'OnUserCheck': 31
[16:22:18] [DEBUG] processing specifier 'd' with parameter index 0
[16:22:18] [DEBUG] retrieved and pushed value '0'
[16:22:18] [INFO] Callback 'OnUserCheck' set up for delayed execution.
[16:22:18] [DEBUG] created delayed callback with 1 parameter
[16:22:18] [DEBUG] CHandle::Execute(this=0x68e7a0, type=2, query=0x681428)
[16:22:18] [DEBUG] CConnectionPool::Queue(query=0x681428, this=0x6a1728)
[16:22:18] [DEBUG] CHandle::Execute - return value: true
[16:22:18] [DEBUG] CConnection::Execute(query=0x681428, this=0x3ab7020, connection=0x38c8b20)
[16:22:18] [DEBUG] CQuery::Execute(this=0x681428, connection=0x38c8b20)
[16:22:19] [DEBUG] CConnection::GetError(this=0x3ab7020, connection=0x38c8b20)
[16:22:19] [DEBUG] CCallback::Create(amx=0x29a36b8, name='OnQueryError', format='dsssd)
[16:22:26] [DEBUG] mysql_close(1)
[16:22:26] [DEBUG] CHandleManager::Destroy(this=0x69c560, handle=0x68e7a0)
[16:22:27] [DEBUG] CHandle::~CHandle(this=0x68e7a0)
[16:22:27] [DEBUG] CConnection::~CConnection(this=0x6a1768, connection=0x2912878)
[16:22:27] [DEBUG] CThreadedConnection::~CThreadedConnection(this=0x2a27020, connection=0x2a27020)
[16:22:27] [DEBUG] CThreadedConnection::WorkerFunc(this=0x2a27020, connection=0x2a27020) - shutting down
[16:22:27] [DEBUG] CConnection::~CConnection(this=0x2a27020, connection=0x38c00b8)
[16:22:27] [DEBUG] CConnectionPool::~CConnectionPool(this=0x6a1728)
[16:22:27] [DEBUG] CThreadedConnection::~CThreadedConnection(this=0x3c44020, connection=0x3c44020)
[16:22:27] [DEBUG] CThreadedConnection::WorkerFunc(this=0x3c44020, connection=0x3c44020) - shutting down
[16:22:27] [DEBUG] CConnection::~CConnection(this=0x3c44020, connection=0x38d4bb0)
[16:22:27] [DEBUG] CThreadedConnection::~CThreadedConnection(this=0x3ab7020, connection=0x3ab7020)
[16:22:27] [DEBUG] CThreadedConnection::WorkerFunc(this=0x3ab7020, connection=0x3ab7020) - shutting down
[16:22:27] [DEBUG] CConnection::~CConnection(this=0x3ab7020, connection=0x38c8b20)
Alles anzeigen
Hoffe einer von euch kann mir Helfen.