21.08.2014, 09:03
this poped out when I used my command which haves something wrong in it
So when I use crash detect I get this and I dont understand anything from here so can someone explain me what to do and how to fix that here is the command
pawn Код:
[11:01:52] [debug] Run time error 6: "Invalid instruction"
[11:01:52] [debug] Unknown opcode 0x2c00 at address 0x0000006B
[11:01:52] [debug] AMX backtrace:
[11:01:52] [debug] #0 0000006b in public cmd_kupistan () from NLRPGv2.amx
[11:01:52] [debug] #1 native CallLocalFunction () [00472ad0] from samp-server.exe
[11:01:52] [debug] #2 0000a430 in ?? (0x0000006b, 0x00000075, 0x00000070, 0x00000069, 0x0000006b, 0x00000075, 0x00000063, 0x00000075, 0x00000000, 0x00000000, ... <1 argument>) from NLRPGv2.amx
[11:01:52] [debug] #3 0000007d in public OnPlayerCommandText () from NLRPGv2.amx
[11:01:52] [debug] Run time error 6: "Invalid instruction"
[11:01:52] [debug] Unknown opcode 0x29000000 at address 0x0000007D
[11:01:52] [debug] AMX backtrace:
[11:01:52] [debug] #0 ???????? in public OnPlayerCommandText () from NLRPGv2.amx
pawn Код:
CMD:kupistan(playerid, params[])
{
if(PI[playerid][Stan] != -1) return SCM(playerid, GRAD2, " (greska) Vi vec posedujete stan!");
for(new i; i < sizeof(Stanx); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, Stanx[i][sUlazX], Stanx[i][sUlazY], Stanx[i][sUlazZ]))
{
if(!strcmp(Stanx[i][sVlasnik], "Niko", true) && Stanx[i][sImaVlasnika] == 0)
{
if(PI[playerid][Nivo] < Stanx[i][sNivo]) return SCMF(playerid, GRAD2, "(greska) Potreban Vam je nivo %d za ovaj stan!", Stanx[i][sNivo]);
if(PI[playerid][Novac] < Stanx[i][sCena]) return SCM(playerid, GRAD2, " (greska) Nemate dovoljno novca za ovaj stan!");
new hIme[MAX_PLAYER_NAME];
RPIme(playerid, hIme);
strmid(Stanx[i][sVlasnik], hIme, 0, strlen(hIme), 255);
Stanx[i][sImaVlasnika] = 1;
PI[playerid][Stan] = i;
SetPlayerInterior(playerid, Stanx[i][sEnterijer]);
SetPlayerVirtualWorld(playerid, Stanx[i][sVW]);
SetPlayerPos_H(playerid, Stanx[i][sIzlazX], Stanx[i][sIzlazY], Stanx[i][sIzlazZ]);
SetPlayerFacingAngle(playerid, Stanx[i][sIzlazA]);
SCM(playerid, BELA, "Cestitamo, kupili ste stan! Upisite /stan za komande stana.");
NovacMinus(playerid, Stanx[i][sCena]);
MayorInfo[1][Budzet] += Stanx[i][sCena];
EntID[playerid] = i;
PI[playerid][Spawn] = SPAWN_STAN;
PI[playerid][Renta] = -1;
PI[playerid][RentaHotel] = -1;
UpdateLabels();
//SacuvajStan(i);
new kkk[MAX_PLAYER_NAME], upit[128];
ImeIgraca(playerid, kkk);
format(upit, 128, "UPDATE `igraci` SET `Stan` = '%d', `Spawn` = '0', `Renta` = '-1', `RentaHotel` = '-1' WHERE `Ime` = '%s'", PI[playerid][Stan], kkk);
mysql_query(upit, THREAD_OSTALO);
format(CmdString, 100, "| KUPOVINA - STAN | Igrac: %s | ID: %d", kkk, i);
UpisiLog(FAJL_PRIMOVINELOG, CmdString);
format(upit, 128, "UPDATE `stanovi` SET `ImaVlasnika` = '1', `Vlasnik` = '%s' WHERE `ID` = '%d'", hIme, i);
mysql_query(upit, THREAD_OSTALO);
break;
}
else
{
SCM(playerid, GRAD2, " (greska) Ovaj stan nije slobodan!");
}
}
}
return 1;
}