Jump to content
  • 0

Problema MySQL


C0oL3r

Question

Salut, am o problema cu serverul, am facut sa imi arate cand intru pe server "CHECKING BAN STATUS..." pentru 3 secunde si dupa aceea sa imi arate dialogul de login/register si dupa 3 secunde se inchide server-samp.exe

Codul:

Spoiler

 

public OnPlayerConnect(playerid)
{
 GetPlayerName(playerid, pInfo[playerid][Name], MAX_PLAYER_NAME);
 Corrupt_Check[playerid]++;
 pInfo[playerid][RemainingAtt] = 3;
 
 GameTextForPlayer(playerid, "~r~CHECKING BAN STATUS...", 3000, 3);
 SetTimer("OnPlayerChecked", 3000, 0);
 return 1;
}
forward public OnPlayerChecked(playerid);
public OnPlayerChecked(playerid)
{
 new DB_Query[115];
 mysql_format(Database, DB_Query, sizeof(DB_Query), "SELECT * FROM `users` WHERE `Username` = '%e' LIMIT 1", pInfo[playerid][Name]);
 mysql_tquery(Database, DB_Query, "OnPlayerDataCheck", "ii", playerid, Corrupt_Check[playerid]);
 TextDrawShowForAll(Text:blackbox);
}

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Asta e server_log dupa ce am bagat crashdetect
 
Spoiler

SA-MP Dedicated Server

----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[00:39:56] filterscripts = ""  (string)
[00:39:56]
[00:39:56] Server Plugins
[00:39:56] --------------
[00:39:56]  Loading plugin: crashdetect
[00:39:56]   CrashDetect v4.18.1 is OK.
[00:39:56]   Loaded.
[00:39:56]  Loading plugin: mysql
[00:39:56]  >> plugin.mysql: R41-4 successfully loaded.
[00:39:56]   Loaded.
[00:39:56]  Loading plugin: sscanf
[00:39:56]
[00:39:56]  ===============================
[00:39:56]       sscanf plugin loaded.    
[00:39:56]          Version:  2.8.2       
[00:39:56]    (c) 2012 Alex "Y_Less" Cole 
[00:39:56]  ===============================
[00:39:57]   Loaded.
[00:39:57]  Loaded 3 plugins.
[00:39:57]
[00:39:57] Filterscripts
[00:39:57] ---------------
[00:39:57]   Loaded 0 filterscripts.
[00:39:57] Conectat la baza de date!
[00:39:57]
----------------------------------
[00:39:57]  Blank Gamemode by your name here
[00:39:57] ----------------------------------
[00:39:57] Number of vehicle models: 0
[00:39:59] [connection] 127.0.0.1:57088 requests connection cookie.
[00:40:00] [connection] incoming connection: 127.0.0.1:57088 id: 0
[00:40:01] [join] 0To= has joined the server (0:127.0.0.1)
[00:40:04] [debug] Server crashed while executing RPG-C0oL3r.amx
[00:40:04] [debug] AMX backtrace:
[00:40:04] [debug] #0 native mysql_tquery () from mysql.DLL
[00:40:04] [debug] #1 00006724 in public OnPlayerChecked () from RPG-C0oL3r.amx
[00:40:04] [debug] Native backtrace:
[00:40:04] [debug] #0 5a5874d3 in ?? () from plugins\mysql.DLL
[00:40:04] [debug] #1 5a5a5035 in ?? () from plugins\mysql.DLL
[00:40:04] [debug] #2 5a5ad7d1 in ?? () from plugins\mysql.DLL
[00:40:04] [debug] #3 004010b6 in ?? () from samp-server.exe
[00:40:04] [debug] #4 5a65d60a in ?? () from plugins\crashdetect.DLL
[00:40:04] [debug] #5 5a664078 in ?? () from plugins\crashdetect.DLL
[00:40:04] [debug] #6 5a65a767 in ?? () from plugins\crashdetect.DLL
[00:40:04] [debug] #7 5a65d65a in ?? () from plugins\crashdetect.DLL
[00:40:04] [debug] #8 00482a68 in ?? () from samp-server.exe
[00:40:04] [debug] #9 004912ba in ?? () from samp-server.exe
[00:40:04] [debug] Registers:
[00:40:04] [debug] EAX: 00000000 EBX: 04b54944 ECX: 0019f9ac EDX: 04af00fc
[00:40:04] [debug] ESI: 0019fb1c EDI: 0019fadc EBP: 00000000 ESP: 0019fe18
[00:40:04] [debug] EIP: 004912ba EFLAGS: 00010246
[00:40:04] [debug] Stack:
[00:40:04] [debug] ESP+00000000: 00000005 7723dd70 7723dd20 00000000
[00:40:04] [debug] ESP+00000020: 0019ff80 0020b000 0000401c 00010101
[00:40:04] [debug] ESP+00000040: 02739e10 656d6167 65646f6d 00003531
[00:40:04] [debug] ESP+00000060: 0019fe68 0019ff70 0019ff70 0049d208
[00:40:04] [debug] ESP+00000080: 004ab4a0 0019ff70 004ab0e1 ffffffff
[00:40:04] [debug] ESP+000000a0: 00000094 00000006 00000002 000023f0
[00:40:04] [debug] ESP+000000c0: 00000000 00000000 00000000 00000000
[00:40:04] [debug] ESP+000000e0: 00000000 00000000 00000000 00000000
[00:40:04] [debug] ESP+00000100: 00000000 00000000 00000000 00000000
[00:40:04] [debug] ESP+00000120: 00000000 00000000 00000000 00000000
[00:40:04] [debug] ESP+00000140: 00000000 00000000 c0000005 00000000
[00:40:04] [debug] ESP+00000160: 004ba530 00000000 0019ff94 771e8654
[00:40:04] [debug] ESP+00000180: 77d94a77 0020b000 fd851713 00000000
[00:40:04] [debug] ESP+000001a0: 00000000 00000000 fd851713 0019ffa0
[00:40:04] [debug] ESP+000001c0: 00000000 0019ffec 77d94a47 ffffffff
[00:40:04] [debug] ESP+000001e0: 0020b000 00000000 78746341 00000020
[00:40:04] [debug] ESP+00000200: 00000020 00000000 00000014 00000001
[00:40:04] [debug] ESP+00000220: 00000000 00000000 00000000 00000000
[00:40:04] [debug] ESP+00000240: 00000044 000002e0 0000025c 00000000
[00:40:04] [debug] ESP+00000260: 00000342 00000000 2d59495b 000008cc
[00:40:04] [debug] ESP+00000280: 32ceeacd 00000bfc 00000042 00000c40
[00:40:04] [debug] ESP+000002a0: 0000005e 00000fd0 00000362 00000000
[00:40:04] [debug] ESP+000002c0: 00000392 00000010 00000009 000000ec
[00:40:04] [debug] ESP+000002e0: 00000001 00000002 00001758 000007a0
[00:40:04] [debug] ESP+00000300: 00000001 00000004 00002d84 00000314
[00:40:04] [debug] ESP+00000320: 00000002 00000006 00003130 000000cc
[00:40:04] [debug] ESP+00000340: 00000001 00000009 000032ec 00000028
[00:40:04] [debug] ESP+00000360: 00000001 64487353 0000002c 00000001
[00:40:04] [debug] ESP+00000380: 00000001 000015a4 0000002c 0000005e
[00:40:04] [debug] ESP+000003a0: 00000000 00000000 00000000 00000000
[00:40:04] [debug] ESP+000003c0: 00000038 00000000 003a0043 0057005c
[00:40:04] [debug] ESP+000003e0: 006e0069 00780053 005c0073 00000000
[00:40:04] [debug] Loaded modules:
[00:40:04] [debug] 00400000 - 00519000 samp-server.exe
[00:40:04] [debug] 77d30000 - 77ebd000 ntdll.dll
[00:40:04] [debug] 771d0000 - 772a0000 KERNEL32.DLL
[00:40:04] [debug] 77b50000 - 77d27000 KERNELBASE.dll
[00:40:04] [debug] 75910000 - 76c43000 SHELL32.dll
[00:40:04] [debug] 77020000 - 770dd000 msvcrt.dll
[00:40:04] [debug] 758d0000 - 75908000 cfgmgr32.dll
[00:40:04] [debug] 77770000 - 77887000 ucrtbase.dll
[00:40:04] [debug] 772b0000 - 77338000 shcore.dll
[00:40:04] [debug] 774c0000 - 7757e000 RPCRT4.dll
[00:40:04] [debug] 74750000 - 74770000 SspiCli.dll
[00:40:04] [debug] 74740000 - 7474a000 CRYPTBASE.dll
[00:40:04] [debug] 77710000 - 77767000 bcryptPrimitives.dll
[00:40:04] [debug] 75780000 - 757c3000 sechost.dll
[00:40:04] [debug] 75480000 - 756c6000 combase.dll
[00:40:04] [debug] 74a60000 - 75026000 windows.storage.dll
[00:40:04] [debug] 757e0000 - 75858000 advapi32.dll
[00:40:04] [debug] 74770000 - 747b5000 shlwapi.dll
[00:40:04] [debug] 77580000 - 775a2000 GDI32.dll
[00:40:04] [debug] 775b0000 - 7770e000 gdi32full.dll
[00:40:04] [debug] 75700000 - 7577c000 msvcp_win.dll
[00:40:04] [debug] 77340000 - 774b5000 USER32.dll
[00:40:04] [debug] 75030000 - 75046000 win32u.dll
[00:40:04] [debug] 77b40000 - 77b4e000 kernel.appcore.dll
[00:40:04] [debug] 76f70000 - 76fb5000 powrprof.dll
[00:40:04] [debug] 77a20000 - 77a34000 profapi.dll
[00:40:04] [debug] 6d810000 - 6d818000 WSOCK32.dll
[00:40:04] [debug] 71010000 - 71034000 WINMM.dll
[00:40:04] [debug] 75860000 - 758c6000 WS2_32.dll
[00:40:04] [debug] 70fe0000 - 71003000 winmmbase.dll
[00:40:04] [debug] 76df0000 - 76e15000 IMM32.DLL
[00:40:04] [debug] 5a640000 - 5a690000 crashdetect.DLL
[00:40:04] [debug] 61580000 - 6163f000 MSVCR100.dll
[00:40:04] [debug] 5a5d0000 - 5a639000 MSVCP100.dll
[00:40:04] [debug] 5a580000 - 5a5ce000 mysql.DLL
[00:40:04] [debug] 5a560000 - 5a57a000 log-core.dll
[00:40:04] [debug] 5a490000 - 5a55d000 libmariadb.dll
[00:40:04] [debug] 59270000 - 592e1000 MSVCP140.dll
[00:40:04] [debug] 77890000 - 77a12000 CRYPT32.dll
[00:40:04] [debug] 59250000 - 59265000 VCRUNTIME140.dll
[00:40:04] [debug] 772a0000 - 772ae000 MSASN1.dll
[00:40:04] [debug] 698a0000 - 698aa000 Secur32.dll
[00:40:04] [debug] 72790000 - 727a1000 napinsp.dll
[00:40:04] [debug] 72770000 - 72786000 pnrpnsp.dll
[00:40:04] [debug] 710e0000 - 710f3000 NLAapi.dll
[00:40:04] [debug] 72bd0000 - 72c25000 mswsock.dll
[00:40:04] [debug] 727c0000 - 72854000 DNSAPI.dll
[00:40:04] [debug] 757d0000 - 757d7000 NSI.dll
[00:40:04] [debug] 741a0000 - 741d0000 IPHLPAPI.DLL
[00:40:04] [debug] 72760000 - 7276c000 winrnr.dll
[00:40:04] [debug] 710d0000 - 710e0000 wshbth.dll
[00:40:04] [debug] 72af0000 - 72af8000 rasadhlp.dll
[00:40:04] [debug] 10000000 - 1000f000 sscanf.DLL
[00:40:04] [debug] 70be0000 - 70c2e000 fwpuclnt.dll
[00:40:04] [debug] 740d0000 - 740e9000 bcrypt.dll

 

EDIT: Am observat ca daca nu mai pun 

Spoiler

 

forward public OnPlayerDataCheck(playerid, corrupt_check);
public OnPlayerDataCheck(playerid, corrupt_check)
{
 if(corrupt_check != Corrupt_Check[playerid]) return Kick(playerid);
 if(cache_num_rows() > 0)
 { 
  cache_get_value(0, "Password", pInfo[playerid][Password], 65);
  ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "SERVER: Login", "Welcome to *********.\n\nPlease enter you password below!", "Login", "Cancel");
 }
 else
 {
   ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "SERVER: Registration", "Welcome to *********.\n\nPlease enter your desired password below!", "Register", "Cancel");
 }
 return 1;
}

 

nu da crash serverul. Asta e functia pe care o cheama mysql_tquery din functia anterioara

Edited by C0oL3r
Link to comment
Share on other sites

  • 0

E problema de la funcția respectivă.

Adaugă la OnGameModeInit, 

mysql_log(ALL);

Pornește server-ul și arată mysql_log.

Și nu este nevoie de 

forward public function( ).

Poți face normal:

forward function();
public function()
{
	{
		// ce face functia ta
		return 1;
	}
	return 1;
}

 

Edited by webby
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.