Jump to content

[REZOLVAT] Probleme goldplay pica


KRIVER
 Share

Recommended Posts

Username:KRIVER
Problema întălnită:salut mai pica server cate odata si la bounds imi da asta[16:08:39] Server crashed while executing beta.amx
[16:08:39] AMX backtrace: 
[16:08:39] #0 native mysql_query () in mysql_static.so
[16:08:39] #1 00078210 in ?? (1) at beta.pwn:1028
[16:08:39] #2 000269a4 in public MP_OPC (playerid=1) at C:\Users\KRIVOER\Desktop\beta\pawno\include\YSI\y_hooks/impl.inc:633
[16:08:39] #3 native CallLocalFunction () in samp03svr
[16:08:39] #4 0001aaac in public L_AFK_OPC (playerid=1) at C:\Users\KRIVOER\Desktop\beta\pawno\include\mSelection.inc:432
[16:08:39] #5 native CallLocalFunction () in samp03svr
[16:08:39] #6 00016db0 in public SSCANF_OnPlayerConnect (playerid=1) at C:\Users\KRIVOER\Desktop\beta\pawno\include\AutoAFK.inc:85
[16:08:39] #7 0000ff00 in public Itter_OnPlayerConnect (playerid=1) at C:\Users\KRIVOER\Desktop\beta\pawno\include\sscanf2.inc:242
[16:08:39] #8 0000e518 in public OnPlayerConnect (playerid=1) at C:\Users\KRIVOER\Desktop\beta\pawno\include\YSI\y_iterate.inc:646

Detalii despre problemă:imi da bounds asta si cate odata mai pica sv asa singur zice you restarting
Ce ai încercat să faci înainte să postezi?:nu stiu de la ce ar putea sa fie va las linia 1028 adica o sa va las tot onplayerconnect
Cod sursă (recomandat pastebin.com) :https://pastebin.com/0egDyhE4
Alte detalii:cine ma poate ajuta are +1 si un multumesc:mai exact de la cache ala de la login da folosesc r39-6

Edited by KRIVER
Link to comment
Share on other sites

Incearca asa:

mysql_format(SQL, szString, 67, "SELECT * FROM `users` WHERE `name` = '%e' LIMIT 0, 1", GetName(playerid));
mysql_tquery(SQL, szString, "OnCheckLogin", "d", playerid);
	forward OnCheckLogin(playerid);
public OnCheckLogin(playerid) {
	    if(cache_get_row_count() > 0) PlayerAccount[playerid] = 1;
    else PlayerAccount[playerid] = 0;
	    login[playerid] = SetTimerEx("LoginTimer", 30000, false,"d", playerid);
    PlayerTextdraws(playerid);
    CheckClassIP(playerid);
	    return 1;
}

Nu ai nevoie sa trimiti un query mereu cand un player se conecteaza, mai bine faci un tquery, ca se pot conecta si 100 odata

Link to comment
Share on other sites

Chiar acum, alexC a spus:

Incearca asa:

 


// sterge alea si adauga asta la OnPlayerConnect
mysql_format(SQL, szString, 67, "SELECT * FROM `users` WHERE `name` = '%e' LIMIT 0, 1", GetName(playerid));
mysql_tquery(SQL, szString, "OnCheckLogin", "d", playerid);


// adauga mai jos
forward OnCheckLogin(playerid);
public OnCheckLogin(playerid) {
	if(cache_get_row_count() > 0) PlayerAccount[playerid] = 1;
    else PlayerAccount[playerid] = 0;
    
	login[playerid] = SetTimerEx("LoginTimer", 30000, false,"d", playerid);
    PlayerTextdraws(playerid);
    CheckClassIP(playerid);
    
	return 1;
}

 

Nu ai nevoie sa trimiti un query mereu cand un player se conecteaza, mai bine faci un tquery, ca se pot conecta si 100 odata

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...