HELP Pleasee
#1

When I try to sell my house in the game my server crashes and I get this in server log with my crashdetect what should I do how to fix this??
Quote:

[18:25:28] [debug] Server crashed while executing NLRPGv3.amx
[18:25:28] [debug] AMX backtrace:
[18:25:28] [debug] #0 0000006b in ?? (0x00000070, 0x00000069, 0x00000067, 0x00000061, 0x00000072, 0x00000061, 0x0000007a, 0x00000075, 0x00000000, 0x00000061, ... <19 arguments>) from NLRPGv3.amx
[18:25:28] [debug] #1 0000006b in public cmd_akuca () from NLRPGv3.amx
[18:25:28] [debug] #2 native CallLocalFunction () [080d2bb0] from samp03svr
[18:25:28] [debug] #3 00004784 in public FIXES_OnPlayerCommandText (0x00000000, 0x00978ea from NLRPGv3.amx
[18:25:28] [debug] #4 native CallLocalFunction () [080d2bb0] from samp03svr
[18:25:28] [debug] #5 00000b7c in public OnPlayerCommandText (0x00000000, 0x00978e70) from NLRPGv3.amx

Reply
#2

The command "akuca" caused the crash I believe. Show us that command.
Reply
#3

Here is command :
(In translation /akuca means /ahouse , I can use it like /akuca prodaj, /akuca info, I used /akuca prodaj wich means /ahouse sell and it should update mysql db so here it is)

Quote:

CMD:akuca(playerid, params[])
{
if(PI[playerid][Admin] >= HEAD || IsPlayerAdmin(playerid))
{
new i = -1;
for(new x; x < MAX_KUCA; x++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, Kuce[x][UlazX], Kuce[x][UlazY], Kuce[x][UlazZ]))
{
i = x;
AIzm[playerid] = x;
break;
}
}
if(i == -1) return SCM(playerid, CRVENA, "BT Protect | Niste u blizini kuce!");
new akcija[16], upit[300];
if(sscanf(params, "s[16]", akcija)) return SCM(playerid, GRAD3, "Koristite: {BFC0C2}/akuca [Akcija (Prodaj, Info, Izmeni)]");
if(!strcmp(akcija, "prodaj", true))
{
if(Kuce[i][ImaVlasnika] == 0) return SCM(playerid, CRVENA, "BT Protect | Ta kuca nema vlasnika!");
if(Kuce[i][HCModel] != -1) DestroyVehicle(Kuce[i][HCV]);
Kuce[i][ImaVlasnika] = 0; Kuce[i][HCX] = 9999.0; Kuce[i][HCY] = 9999.0; Kuce[i][HCZ] = 0.0; Kuce[i][HCA] = 0.0; Kuce[i][HCModel] = -1; Kuce[i][kSef] = 0;
Kuce[i][tKanister] = 0; Kuce[i][tUze] = 0; Kuce[i][DostupnoZaRent] = 0; Kuce[i][RentCena] = -1; Kuce[i][hDroga] = 0; Kuce[i][Oruzje1] = -1;
Kuce[i][Oruzje2] = -1; Kuce[i][Oruzje3] = -1; Kuce[i][Municija1] = -1; Kuce[i][Municija2] = -1; Kuce[i][Municija3] = -1; Kuce[i][Zakljucano] = 1;
Kuce[i][tZice] = 0; Kuce[i][tGDProdaja] = 0; Kuce[i][tTorba] = 0; Kuce[i][tDroga] = 0; Kuce[i][tPizza] = 0; Kuce[i][tSok] = 0; Kuce[i][tHotdog] = 0;
Kuce[i][tGPS] = 0; Kuce[i][tGDOruzje] = 0; Kuce[i][tSemena] = 0; Kuce[i][tKoka] = 0; Kuce[i][HCBoja1] = -1; Kuce[i][HCBoja2] = -1; Kuce[i][kHeal] = 0;
strmid(Kuce[i][Vlasnik], "Niko", 0, strlen("Niko"), 255);
//SacuvajKucu(i);
UpdateLabels();
SCMF(playerid, CRVENA, "|{FFFFFF}A{FF0000}| {FFFFFF}Prodali ste kucu. ID kuce: %d", i);
new ip[24], ime[MAX_PLAYER_NAME];
RPIme(playerid, ime);
GetPlayerIp(playerid, ip, 24);
format(CmdString, 128, "| AKUCA | Akcija: PRODAJ | Izvrsio: %s | Kuca: %d | IP: %s", ime, i, ip);
UpisiLog(FAJL_AVLOG, CmdString);
AIzm[playerid] = -1;
format(upit, 300, "UPDATE `Kuce` SET `ImaVlasnika` = '0', `HCX` = '9999.0', `HCY` = '9999.0', `HCZ` = '9999.0', `HCA` = '9999.0', `HCModel` = '-1', \
`Sef` = '0', `Kanister` = '0', `Uze` = '0', `DostupnoZaRent` = '0', `RentCena` = '-1', `hDroga` = '0', `Droga` = '0', `Oruzje1` = '-1' WHERE `ID` = '%d'", i);
mysql_query(upit, THREAD_OSTALO);
format(upit, 300, "UPDATE `Kuce` SET `Oruzje2` = '-1', `Oruzje3` = '-1', `Municija1` = '-1', `Municija2` = '-1', `Municija3` = '-1', `Zice` = '0', \
`Zakljucano` = '1', `GDProdaja` = '0', `Torba` = '0', `Pizza` = '0', `Sok` = '0', `Hotdog` = '0', `GDOruzje` = '0', `Semena` = '0', `Koka` = '0' WHERE `ID` = '%d'", i);
mysql_query(upit, THREAD_OSTALO);
format(upit, sizeof(upit), "UPDATE `Kuce` SET `HCBoja1` = '-1', `HCBoja2` = '-1', `Heal` = '0', `Vlasnik` = 'Niko' WHERE `ID` = '%d'", i);
mysql_query(upit, THREAD_OSTALO);
}
else if(!strcmp(akcija, "info", true))
{
new hc[32], rent[32], torba[3];
if(Kuce[i][HCModel] == -1) hc = "Nema";
else format(hc, 32, "%s", ImenaVozila[Kuce[i][HCModel] - 400]);
if(Kuce[i][DostupnoZaRent] == 0) rent = "Ne moze se iznajmiti";
else format(rent, 32, "$%d", Kuce[i][RentCena]);
if(Kuce[i][tTorba] == 0) torba = "Ne";
else torba = "Da";
SCMF(playerid, ZELENA2, "|__________ Kuca - INFO (%d) __________|", i);
SCMF(playerid, ZELENA2, "| - Vrsta: {FFFFFF}%s", Kuce[i][Vrsta]);
SCMF(playerid, ZELENA2, "| - Adresa: {FFFFFF}%s", Kuce[i][Adresa]);
SCMF(playerid, ZELENA2, "| - Nivo: {FFFFFF}%d", Kuce[i][kNivo]);
SCMF(playerid, ZELENA2, "| - Cena: {FFFFFF}$%d", Kuce[i][Cena]);
SCMF(playerid, ZELENA2, "| - Kucno vozilo: {FFFFFF}%s", hc);
SCMF(playerid, ZELENA2, "| - Sef: {FFFFFF}$%d", Kuce[i][kSef]);
SCMF(playerid, ZELENA2, "| - Rent cena: {FFFFFF}%s", rent);
SCMF(playerid, ZELENA2, "| - Torba: {FFFFFF}%s", torba);
SCM(playerid, ZELENA2, "|_________________________________|");
AIzm[playerid] = -1;
}
else if(!strcmp(akcija, "izmeni", true))
{
SPD(playerid, 204, DIALOG_STYLE_LIST, "Izmena kuce", "Izmeni adresu\nIzmeni nivo\nIzmeni cenu\nIzmeni HC\nIzmeni novac u sefu", "Odaberi", "Izadji");
}
else return SCM(playerid, CRVENA, "BT Protect | Nepoznata akcija!");
}
else return SCM(playerid, CRVENA, "BT Protect | Nemate autorizaciju za koristenje ove naredbe!");
return 1;
}

Reply
#4

Add debug messages and check what part it crashes at.
Reply
#5

How do you think add debug messages how to add them ?
Reply
#6

https://sampwiki.blast.hk/wiki/Debugging
Reply
#7

It's easier/faster to fix it if crashdetect gives more information so compile with debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info

If the version of crashdetect plugin you use is not the latest one (which is 4.13), then update it to the latest one: https://github.com/Zeex/samp-plugin-...ases/tag/v4.13

Re-compile your scripts, run the server, execute the command and post the server log.

PS: Use [pawn]code here[/pawn] for the code because with quote tags is not even readable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)