SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 07/03/2013, 07:24 PM   #1
thistooshallpass93
Little Clucker
 
thistooshallpass93's Avatar
 
Join Date: Feb 2013
Posts: 25
Reputation: -3
Default Help?

Hey guys wondering if anyone can help me solve this..

PHP Code:
[20:32:10] [joinPatrick_S has joined the server (0:66.131.146.105)
[
20:32:10] [debugServer crashed while executing mysql.amx
[20:32:10] [debugAMX backtrace:
[
20:32:10] [debug#0 native mysql_fetch_field_row () [b7c379d0] from mysql.so
[20:32:10] [debug#1 00002a94 in ?? () from mysql.amx
[20:32:10] [debug#2 000013b0 in public OnPlayerConnect () from mysql.amx
[20:32:10] [debugSystem backtrace:
[
20:32:10] [debug#0 b6edaecb in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[20:32:10] [debug#1 b6ed2c69 in _ZN11CrashDetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
[20:32:10] [debug#2 b6ed4c99 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[20:32:10] [debug#3 b6eda9d8 in ?? () from plugins/crashdetect.so
[20:32:10] [debug#4 00a510f0 in ?? () from /lib/libpthread.so.0
[20:32:10] [debug#5 b7c31575 in _ZN13CMySQLHandler10FetchFieldESs () from plugins/mysql.so
[20:32:10] [debug#6 b7c37a73 in _ZN7Natives23n_mysql_fetch_field_rowEP6tagAMXPi () from plugins/mysql.so
[20:32:10] [debug#7 08093c94 in ?? () from ./samp03svr
[20:32:10] [debug#8 b6ed4f37 in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[20:32:10] [debug#9 b6ed7268 in ?? () from plugins/crashdetect.so
[20:32:10] [debug#10 b6edd2c2 in amx_Exec () from plugins/crashdetect.so
[20:32:10] [debug#11 b6ed4e1e in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[20:32:10] [debug#12 b6ed72de in ?? () from plugins/crashdetect.so 
OnPlayerConnect

PHP Code:
public OnPlayerConnect(playerid)
{
    
RemoveUnderScore(playerid);
    
TextDrawHideForPlayer(playeridTextdraw1);
    
MoneyGiven[playerid] = -1;
    
JustLogged[playerid] = 0;
    new 
query[300], pname[24];
    
GetPlayerName(playeridpname24);
    
format(querysizeof(query), "SELECT IP FROM `playerdata` WHERE user = '%s' LIMIT 1"pname);
    
mysql_query(query);
    
mysql_store_result();
    new 
rows mysql_num_rows();
    if(!
rows)
    {
        
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""Blue"Please register",""White"Welcome to "Red""SERVER_NAME""White"!\n"White"In order to start playing, you have to register!\n\n"White"Please insert a password below:""Register""Cancel");
    }
    if(
rows == 1)
    {
        new 
IP[2][15];
        
mysql_fetch_field_row(IP[0],"IP");
        
GetPlayerIp(playeridIP[1], 15);
        if(
strlen(IP[0]) != && !strcmp(IP[0], IP[1], true))
        {
            
MySQL_Login(playerid);
        }
        else if(!
strlen(IP[0]) || strcmp(IP[0], IP[1], true))
        {
            
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT""Blue"Please log-in"""White"Welcome back to "Red""SERVER_NAME""White"!\n"White"In order to start playing, you have to log-in!\n\n"White"Please insert "Red"your"White" password below:""Login""Cancel");
            
IsRegistered[playerid] = 1;
        }
    }
    
mysql_free_result();
    return 
1;

EDIT: it only happens if i reconnect to the server with the same character name after registering once. If i change it after registering my name it doesn't crash at connect. it's weird man..
__________________
My Tutorials
thistooshallpass93 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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



All times are GMT. The time now is 04:55 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.