Jump to content

[REZOLVAT] Problema /stats


TSN
 Share

Recommended Posts

Username: dulcaalexandru
Problema întălnită: Cand sau /stats pica server-ul.
Detalii despre problemă: Am adaugat sa cumperi casa de nivel 999 in shop si sa iti schimbe interior-ul. Dupa ce dau sa cumpar casa din shop, tot-ul bine, insa daca dau /stats pica server-ul.
Ce ai încercat să faci înainte să postezi?: nimic pentru ca nu stiu motivatia...
Cod sursă (recomandat pastebin.com) : https://pastebin.com/2bT5s7Sp
Alte detalii: Multumesc anticipat.

?imw=5000&imh=5000&ima=fit&impolicy=Lett

Link to comment
Share on other sites

Acum 1 minut, nobilzeusAdv a spus:

ce eroare primesti in serverlog cand pica?

[18:59:33] [debug] Server crashed while executing abiregele.amx
[18:59:33] [debug] AMX backtrace:
[18:59:33] [debug] #0 native strcmp () from samp-server.exe
[18:59:33] [debug] #1 0036f7f0 in public ShowStats (playerid=0, targetid=0) at abiregele.pwn:34255
[18:59:33] [debug] #2 00244ff4 in public @_yCstats (playerid=0, params[]=@03a59c80 "", help=0) at abiregele.pwn:19678
[18:59:33] [debug] #3 00244f84 in public @yC_stats (... <4 arguments>)  at abiregele.pwn:19678
[18:59:33] [debug] #4 native CallRemoteFunction () from samp-server.exe
[18:59:33] [debug] #5 000410c4 in Command_Process (playerid=0, cmdtext[]=@03a59c64 "/stats", help=0) at C:\Users\Alex-PC\Desktop\GM AbiRegele\pawno\include\YSI\y_commands.inc:2503
[18:59:33] [debug] #6 00040704 in ?? (... <2 arguments>) at C:\Users\Alex-PC\Desktop\GM AbiRegele\pawno\include\YSI\y_commands.inc:2297
[18:59:33] [debug] #7 0003025c in public OnPlayerCommandText (playerid=0, cmdtext[]=@03a59c64 "/stats") at C:\Users\Alex-PC\Desktop\GM AbiRegele\pawno\include\YSI\y_hooks/impl.inc:946
[18:59:33] [debug] Native backtrace:
[18:59:33] [debug] #0 7655c9d7 in ?? () from C:\Windows\SYSTEM32\KERNELBASE.dll
[18:59:33] [debug] #1 004061b4 in ?? () from samp-server.exe

Tin sa mentionez ca dupa ce pica server-ul si il pornesc iar, merge totul perfect. Doar dupa ce cumpar si dau /stats pica.

?imw=5000&imh=5000&ima=fit&impolicy=Lett

Link to comment
Share on other sites

Acum 1 minut, nobilzeusAdv a spus:

liniile astea te rog, 


34255 , 

19678
19678 - YCMD:stats(playerid, params[], help) return ShowStats(playerid,playerid);

 34255-   if(hkey != 999) {
        if(hkey != 999 && strcmp(GetName(targetid), HouseInfo[hkey][hOwner], true) == 0) format(string, sizeof(string), "House: %d | ", hkey);
        else format(string, sizeof(string), "Rent House: %d | ", hkey);
        strcat(infostring, string);
    }

 

?imw=5000&imh=5000&ima=fit&impolicy=Lett

Link to comment
Share on other sites

Chiar acum, dulcaalexandru a spus:

19678 - YCMD:stats(playerid, params[], help) return ShowStats(playerid,playerid);

 34255-   if(hkey != 999) {
        if(hkey != 999 && strcmp(GetName(targetid), HouseInfo[hkey][hOwner], true) == 0) format(string, sizeof(string), "House: %d | ", hkey);
        else format(string, sizeof(string), "Rent House: %d | ", hkey);
        strcat(infostring, string);
    }

 

cauta hkey unde este definit in functie

Edited by nobilzeusAdv
Link to comment
Share on other sites


Acum 2 minute, nobilzeusAdv a spus:
cauta hkey unde este definit

                    if(PlayerInfo[playerid][pPremiumPoints] < 2000) return SCM(playerid, -1, "Nu ai suficiente puncte premium!");
                    if(GetPlayerInterior(playerid) == 0) return SCM(playerid, COLOR_LGREEN, "{008080}Eroare: {FFFFFF}Nu esti in interior-ul casei tale!");
                    if(PlayerInfo[playerid][pHouse] != 999 && strcmp(GetName(playerid), HouseInfo[PlayerInfo[playerid][pHouse]][hOwner], true) == 0) { }
                    else return SCM(playerid, COLOR_GREY, "Nu ai o casa!");
                    new hkey = PlayerInfo[playerid][pHouse],result = 999,str[180], Float: Pos[3];
                    PlayerInfo[playerid][pPremiumPoints] -= 2000;
                    Update(playerid, pPremiumPointsx);    
                    format(string, sizeof(string), "{008080}SHOP: {FFFFFF}Felicitari! Ti-ai cumparat level 999 la casa ID:(%d). Beneficii /house.", hkey);
                    SCM(playerid, COLOR_WHITE, string);
                    format(string, sizeof(string), "%s si-a achizitionat Level 999 la casa lui pentru 2000 puncte premium.", GetName(playerid));
                    InsertLog(playerid, string, LOG_SHOP);
                    HouseInfo[hkey][hLevel] = result;
                    format(str, sizeof(str), "UPDATE `houses` SET `Level`='%d' WHERE `ID`='%d'", result, hkey);
                    mysql_query(SQL,str);
                    UpdateLabel(1, hkey);
                    // daca scot asta de jos, nu mai pica !

                    format(string, sizeof(string), "{008080}SHOP: {FFFFFF}Interior-ul casei tale ID:(%d), a fost modificat in unul VIP.", hkey);
                    SCM(playerid, COLOR_WHITE, string);
                    HouseInfo[hkey][hOwner][hExitx] = Pos[0] = 1378.0913;
                    HouseInfo[hkey][hOwner][hExity] = Pos[1] = -820.3952;
                    HouseInfo[hkey][hOwner][hExitz] = Pos[2] = 1092.3500;
                    HouseInfo[hkey][hInterior] = GetPlayerInterior(playerid);
                    SCM(playerid, COLOR_LGREEN, "Interiorul casei a fost modificat!");
                    format(query, sizeof(query), "UPDATE `houses` SET `Exitx`='%f', `Exity`='%f', `Exitz`='%f', `Interior`='%d' WHERE `ID`='%d'", Pos[0], Pos[1], Pos[2], GetPlayerInterior(playerid), hkey);
                    mysql_query(SQL, query);
                    SetPlayerPos(playerid, 1378.0913,-820.3952,1092.3500); 

 

Edited by dulcaalexandru

?imw=5000&imh=5000&ima=fit&impolicy=Lett

Link to comment
Share on other sites

HouseInfo[hkey][hOwner][hExitx] = Pos[0] = 1378.0913;
                    HouseInfo[hkey][hOwner][hExity] = Pos[1] = -820.3952;
                    HouseInfo[hkey][hOwner][hExitz] = Pos[2] = 1092.3500;

 

aici este o problema, incearca asa HouseInfo[hkey][hExitz] = coordonate;

Edited by nobilzeusAdv
Link to comment
Share on other sites

Acum 7 minute, nobilzeusAdv a spus:

HouseInfo[hkey][hOwner][hExitx] = Pos[0] = 1378.0913;
                    HouseInfo[hkey][hOwner][hExity] = Pos[1] = -820.3952;
                    HouseInfo[hkey][hOwner][hExitz] = Pos[2] = 1092.3500;

 

aici este o problema, incearca asa HouseInfo[hkey][hExitz] = coordonate;

lafel

?imw=5000&imh=5000&ima=fit&impolicy=Lett

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...