SA-MP Forums Archive
Need Small Help About SetPlayerName Help REP +1 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need Small Help About SetPlayerName Help REP +1 (/showthread.php?tid=556120)



Need Small Help About SetPlayerName Help REP +1 - MBilal - 09.01.2015

PHP код:
    if(dialogid == JDIALOGS+1)
    {
       if(
response)
       {
         new 
file[256],pIP[16];
         if(
InvalidNick(inputtext)) return ShowPlayerDialog(playeridJDIALOGS+1DIALOG_STYLE_INPUT,"Registration error""Please enter a another nick\n{FF0000}*Unacceptable NickName. Please only use (0-9, a-z, [], (), $, @, ., _ and =)""Next""No Thanks");
         
format(file128ACCOUNTS_PATHinputtext);
         if(!
fexist(file))
         {
            
SetPlayerName(playerid,inputtext);
            
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD,"Register an account!""Enter password:""Register""No Thanks");
            
GetPlayerIp(playerid,pIP,16);
            
format(file,sizeof(file),"JLadmin/Logs/aka.ini");
            
INI_ParseFile(file,"GetAkaLog");
            if(
strfind(akaGetName(playerid), true) == -1)
            {
                    
format(file,sizeof(file),"JLadmin/Logs/aka.ini");
                    
format(Jstring,sizeof(Jstring),"%s,%s"akaGetName(playerid));
                    new 
INI:AKA INI_Open(file);
                    
INI_WriteString(AKApIPJstring);
                    
INI_Close(AKA);
            }
         }
         else return 
ShowPlayerDialog(playeridJDIALOGS+1DIALOG_STYLE_INPUT,"Registration error""Please enter a another nick\n{FF0000}*You entered nick name is already using someone else""Next""No Thanks");
       }
    } 
here are the Debug errors..


[debug] AMX backtrace:
[23:56:10]
[debug] #0 native SetPlayerName () from sscanf.so
[23:56:10]
[debug] #1 00033eec in ?? (0x00000000, 0x000007d1, 0x00000001, 0xffffffff, 0x0112ce1c) from New.amx
[23:56:10]
[debug] #2 00008634 in public OnDialogResponse (0x00000000, 0x000007d1, 0x00000001, 0xffffffff, 0x0112ce1c) from New.amx
[23:56:10]
[debug] Native backtrace:
[23:56:10]
[debug] #0 b741993b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[23:56:10]
[debug] #1 b741268f in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[23:56:10]
[debug] #2 b741385c in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[23:56:10]
[debug] #3 b7413ca6 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[23:56:10]
[debug] #4 b741958c in ?? () from plugins/crashdetect.so
[23:56:10] [debug] #5 b773e600 in ?? ()
[23:56:10]
[debug] #6 080d3757 in ?? () from samp03svr
[23:56:10] [debug] #7 080d56b5 in ?? () from samp03svr
[23:56:10]
[debug] #8 b73f50e6 in ?? () from plugins/sscanf.so
[23:56:10]
[debug] #9 08094054 in ?? () from samp03svr
[23:56:10]
[debug] #10 b735a6e4 in ?? () from plugins/streamer.so
[23:56:10]
[debug] #11 b741539e in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[23:56:10]
[debug] #12 b7418398 in ?? () from plugins/crashdetect.so
[23:56:10]


Re: Need Small Help About SetPlayerName Help REP +1 - MBilal - 09.01.2015

I really dont know but it some time crash..
players make any name ...like 123 or hiljfalksf ....
But some times it crash server..and bugged some other dialogs also..