14.06.2014, 09:14
Hello I was posting before here about this and I just can't find the problem causing this first I was downloaded newest version of crashdectet then I was compile mod with -d3 debug flags but's nothing says in server log exept this:
[debug] Run time error 6: "Invalid instruction"
[11:21:15] [debug] Unknown opcode 0x1000000 at address 0x00000065
[11:21:15] [debug] AMX backtrace:
[11:21:15] [debug] #0 00000065 in public LoadAccount () from GURP.amx
firts I was think maybe it's string causing this I mean maybe I load data with small string and then is cause like buffer overroad or something like that but it wasn't that and I was short code and sometimes I get that error and I don't know why it wan't show me the line in public loadaccount where is the problem. I hope so that one of you will be able to help beacuse I don't know what to do anymore I try everthing I look in the code always and I can't figured it out what's wrong in there. Thanks. So here is it now the code:
[debug] Run time error 6: "Invalid instruction"
[11:21:15] [debug] Unknown opcode 0x1000000 at address 0x00000065
[11:21:15] [debug] AMX backtrace:
[11:21:15] [debug] #0 00000065 in public LoadAccount () from GURP.amx
firts I was think maybe it's string causing this I mean maybe I load data with small string and then is cause like buffer overroad or something like that but it wasn't that and I was short code and sometimes I get that error and I don't know why it wan't show me the line in public loadaccount where is the problem. I hope so that one of you will be able to help beacuse I don't know what to do anymore I try everthing I look in the code always and I can't figured it out what's wrong in there. Thanks. So here is it now the code:
pawn Код:
forward LoadAccount(playerid);
public LoadAccount(playerid)
{
PlayerInfo[playerid][Level] = cache_get_row_int(0,4);
PlayerInfo[playerid][Novac] = cache_get_row_int(0,5);
PlayerInfo[playerid][Registriran] = cache_get_row_int(0,6);
PlayerInfo[playerid][SpawnPromijena] = cache_get_row_int(0,7);
PlayerInfo[playerid][Spol] = cache_get_row_int(0,8);
PlayerInfo[playerid][Godine] = cache_get_row_int(0,9);
PlayerInfo[playerid][Porijeklo] = cache_get_row_int(0,10);
PlayerInfo[playerid][Skin] = cache_get_row_int(0,11);
PlayerInfo[playerid][Tutorial] = cache_get_row_int(0,12);
PlayerInfo[playerid][Clan] = cache_get_row_int(0,13);
PlayerInfo[playerid][Lider] = cache_get_row_int(0,14);
PlayerInfo[playerid][Admin] = cache_get_row_int(0,15);
PlayerInfo[playerid][GameSage] = cache_get_row_int(0,16);
PlayerInfo[playerid][Utisan] = cache_get_row_int(0,17);
PlayerInfo[playerid][MjestoAdmina] = cache_get_row_int(0,18);
PlayerInfo[playerid][Rank] = cache_get_row_int(0,19);
PlayerInfo[playerid][Banka] = cache_get_row_int(0,20);
PlayerInfo[playerid][MjestoGS] = cache_get_row_int(0,21);
PlayerInfo[playerid][Kuca] = cache_get_row_int(0,22);
PlayerInfo[playerid][Materijali] = cache_get_row_int(0,23);
Dzep[playerid][xDroga] = cache_get_row_int(0,24);
PlayerInfo[playerid][hHealH] = cache_get_row_int(0,25);
PlayerInfo[playerid][hArmourH] = cache_get_row_int(0,26);
PlayerInfo[playerid][Banovan] = cache_get_row_int(0,27);
PlayerInfo[playerid][Stan] = cache_get_row_int(0,28);
PlayerInfo[playerid][MjestoUOrg] = cache_get_row_int(0,29);
PlayerInfo[playerid][Donator] = cache_get_row_int(0,30);
PlayerInfo[playerid][SatiIgranja] = cache_get_row_int(0,31);
Stvari[playerid][zDroga] = cache_get_row_int(0,32);
PlayerInfo[playerid][MozeDaGasiMobitel] = cache_get_row_int(0,33);
PlayerInfo[playerid][Respekti] = cache_get_row_int(0,34);
PlayerInfo[playerid][RacunMobitel] = cache_get_row_int(0,35);
PlayerInfo[playerid][DozvolaOruzje] = cache_get_row_int(0,36);
PlayerInfo[playerid][DozvolaLetenje] = cache_get_row_int(0,37);
PlayerInfo[playerid][Kredit] = cache_get_row_int(0,38);
PlayerInfo[playerid][Upozoren] = cache_get_row_int(0,39);
PlayerInfo[playerid][BrojMobitela] = cache_get_row_int(0,40);
PlayerInfo[playerid][Zatvoren] = cache_get_row_int(0,41);
PlayerInfo[playerid][ZatvorenVrijeme] = cache_get_row_int(0,42);
PlayerInfo[playerid][DozvolaPlovidba] = cache_get_row_int(0,43);
PlayerInfo[playerid][TimUgovor] = cache_get_row_int(0,44);
PlayerInfo[playerid][KaznaUgovor] = cache_get_row_int(0,45);
PlayerInfo[playerid][Ubojstava] = cache_get_row_int(0,46);
PlayerInfo[playerid][Smrti] = cache_get_row_int(0,47);
PlayerInfo[playerid][ZlocinaPocinio] = cache_get_row_int(0,48);
PlayerInfo[playerid][PutaUhicen] = cache_get_row_int(0,49);
PlayerInfo[playerid][WantedSmrti] = cache_get_row_int(0,50);
PlayerInfo[playerid][TrazenLevel] = cache_get_row_int(0,51);
PlayerInfo[playerid][Vikendica] = cache_get_row_int(0,52);
PlayerInfo[playerid][Hotel] = cache_get_row_int(0,53);
PlayerInfo[playerid][RentaHotel] = cache_get_row_int(0,54);
PlayerInfo[playerid][VozackaDozvola] = cache_get_row_int(0,55);
PlayerInfo[playerid][Firma] = cache_get_row_int(0,56);
PlayerInfo[playerid][PayDayPoeni] = cache_get_row_int(0,57);
PlayerInfo[playerid][IznosRate] = cache_get_row_int(0,58);
PlayerInfo[playerid][PreostaloZaOtplatu] = cache_get_row_int(0,59);
PlayerInfo[playerid][Posao] = cache_get_row_int(0,60);
PlayerInfo[playerid][PosaoUgovor] = cache_get_row_int(0,61);
PlayerInfo[playerid][RentaKucu] = cache_get_row_int(0,62);
PlayerInfo[playerid][SFirma] = cache_get_row_int(0,63);
PlayerInfo[playerid][Biciklo] = cache_get_row_int(0,64);
PlayerInfo[playerid][BicikloKreirano] = cache_get_row_int(0,65);
PlayerInfo[playerid][BicikloZakljucano] = cache_get_row_int(0,66);
PlayerInfo[playerid][Letjelica] = cache_get_row_int(0,67);
PlayerInfo[playerid][LetjelicaKreirana] = cache_get_row_int(0,68);
PlayerInfo[playerid][LetjelicaZakljucana] = cache_get_row_int(0,69);
PlayerInfo[playerid][Plovilo] = cache_get_row_int(0,70);
PlayerInfo[playerid][PloviloKreirano] = cache_get_row_int(0,71);
PlayerInfo[playerid][PloviloZakljucano] = cache_get_row_int(0,72);
PlayerInfo[playerid][Imenik] = cache_get_row_int(0,73);
PlayerInfo[playerid][Motor] = cache_get_row_int(0,74);
PlayerInfo[playerid][MotorKreiran] = cache_get_row_int(0,75);
PlayerInfo[playerid][MotorZakljucan] = cache_get_row_int(0,76);
PlayerInfo[playerid][Kaciga] = cache_get_row_int(0,77);
PlayerInfo[playerid][Vozilo] = cache_get_row_int(0,78);
PlayerInfo[playerid][VoziloKreirano] = cache_get_row_int(0,79);
PlayerInfo[playerid][VoziloZakljucano] = cache_get_row_int(0,80);
PlayerInfo[playerid][Zavezan] = cache_get_row_int(0,81);
PlayerInfo[playerid][FReket] = cache_get_row_int(0,82);
PlayerInfo[playerid][SReket] = cache_get_row_int(0,83);
PlayerInfo[playerid][PayDayova] = cache_get_row_int(0,84);
PlayerInfo[playerid][AdminGSAktivnost] = cache_get_row_int(0,86);
PlayerInfo[playerid][OffBanovan] = cache_get_row_int(0,87);
PlayerInfo[playerid][OffBanRazlog] = cache_get_row(0,88,PlayerInfo[playerid][OffBanRazlog],512);
PlayerInfo[playerid][ABanovan] = cache_get_row_int(0,89);
PlayerInfo[playerid][ABanRazlog] = cache_get_row(0,90,PlayerInfo[playerid][ABanRazlog],512);
PlayerInfo[playerid][BanNick] = cache_get_row_int(0,91);
PlayerInfo[playerid][Hotdog] = cache_get_row_int(0,92);
Stvari[playerid][zPizza] = cache_get_row_int(0,93);
Stvari[playerid][zSjemena] = cache_get_row_int(0,94);
Stvari[playerid][zKoka] = cache_get_row_int(0,95);
Stvari[playerid][zCigare] = cache_get_row_int(0,96);
Dzep[playerid][xCigare] = cache_get_row_int(0,97);
Dzep[playerid][xUpaljac] = cache_get_row_int(0,98);
Dzep[playerid][xNaocale] = cache_get_row_int(0,99);
Stvari[playerid][zUze] = cache_get_row_int(0,100);
Dzep[playerid][xUze] = cache_get_row_int(0,101);
PlayerInfo[playerid][Frizura] = cache_get_row_int(0,102);
PlayerInfo[playerid][BorbeniStil] = cache_get_row_int(0,103);
PlayerInfo[playerid][MehanicarOdvoz] = cache_get_row_int(0,104);
PlayerInfo[playerid][DetektivVrijeme] = cache_get_row_int(0,105);
PlayerInfo[playerid][DzepkarosVrijeme] = cache_get_row_int(0,106);
PlayerInfo[playerid][KradljivacVrijeme] = cache_get_row_int(0,107);
PlayerInfo[playerid][RadarKazna] = cache_get_row_int(0,108);
PlayerInfo[playerid][MehanicarSkill] = cache_get_row_int(0,109);
PlayerInfo[playerid][DetektivSkill] = cache_get_row_int(0,110);
PlayerInfo[playerid][OdvjetnikSkill] = cache_get_row_int(0,111);
PlayerInfo[playerid][NewsSkill] = cache_get_row_int(0,112);
PlayerInfo[playerid][SexSkill] = cache_get_row_int(0,113);
PlayerInfo[playerid][Contract] = cache_get_row_int(0,114);
new godine,mjesec,dan,mtext[64],spawnime[MAX_PLAYER_NAME],spawnstring[256];
RPIme(playerid,spawnime);
getdate(godine,mjesec,dan);
if(mjesec == 1) { mtext = "Siječanj.2013"; }
else if(mjesec == 2) { mtext = "Veljača.2013"; }
else if(mjesec == 3) { mtext = "Ozujak.2013"; }
else if(mjesec == 4) { mtext = "Travanj.2013"; }
else if(mjesec == 5) { mtext = "Svibanj.2013"; }
else if(mjesec == 6) { mtext = "Lipanj.2013"; }
else if(mjesec == 7) { mtext = "Srpanj.2013"; }
else if(mjesec == 8) { mtext = "Kolovoz.2013"; }
else if(mjesec == 9) { mtext = "Rujan.2013"; }
else if(mjesec == 10) { mtext = "Listopad.2013"; }
else if(mjesec == 11) { mtext = "Studeni.2013"; }
else if(mjesec == 12) { mtext = "Prosinac.2013"; }
new sati,minuta,sekundi;
gettime(sati,minuta,sekundi);
FixHour(sati);
sati = shifthour;
new nxtlevel = PlayerInfo[playerid][Level]+ 1;
new expamount = nxtlevel*levelexp;
new satiigranja = PlayerInfo[playerid][SatiIgranja];
new wlcMsg[512],string2[512];
new randx = random(sizeof(IzrekaDana));
format(wlcMsg,sizeof(wlcMsg),"*Dobrodosao %s, lijepo te opet vidjeti na serveru!",spawnime);
SendClientMessage(playerid,SVIJETLOPLAVA,wlcMsg);
format(string2,sizeof(string2),"*Tvoj dosadasnji zivot: Level [%d] | Respekti [%d/%d] | Sati igranja [%d]",PlayerInfo[playerid][Level],PlayerInfo[playerid][Respekti],expamount,satiigranja);
SendClientMessage(playerid,COLOR_BIJELA,string2);
SCMF(playerid,MojaBoja,"*Izreka Dana: %s",IzrekaDana[randx]);
format(string2,sizeof(string2),"*Datum: %d.%s | Vrijeme: %d:%d h",dan,mtext,sati,minuta);
SendClientMessage(playerid,COLOR_ZUTA,string2);
if(PlayerInfo[playerid][Admin] > 0)
{
PrviAdmin[playerid] = 0;
admini++;
if(admini == 1)
{
PrviAdmin[playerid] = 1;
}
}
if(PlayerInfo[playerid][Donator] > 0) SCMF(playerid,SVIJETLOPLAVA,"*Vi imate jos %d bodova.",PlayerInfo[playerid][Donator]);
if(PlayerInfo[playerid][Admin] > 0)
{
new string[512];
format(string,sizeof(string),"|G-Unit|: Logiran si kao level %d Admina.",PlayerInfo[playerid][Admin]);
SCM(playerid,0xDB023EFF,string);
if(PrviAdmin[playerid] == 1)
{
SCM(playerid,COLOR_LIGHTRED,"| G-Protect | Aktiviram tihi mod...");
GProtect[0][gp_NacinRada] = 1;
new query[512];
mysql_format(mysql,query,sizeof(query),"UPDATE `gprotect` SET `NacinRada` = '1'");
mysql_tquery(mysql,query,"","");
}
format(string2,sizeof(string2),"|GU_Admin||%d| %s, usao na server",PlayerInfo[playerid][Admin],spawnime);
PorukaAdminima(bojalv,string2,1);
PorukaGameSagesima(bojalv,string2,1);
}
if(PlayerInfo[playerid][GameSage] > 0)
{
new string[512];
format(string2,sizeof(string2),"|G-Unit GameSage||%d| %s, usao na server",PlayerInfo[playerid][GameSage],spawnime);
PorukaAdminima(0xA5FF00FF,string2,1);
PorukaGameSagesima(0xA5FF00FF,string2,1);
format(string,sizeof(string),"|G-Unit|: Logiran si kao level %d GameSagea.",PlayerInfo[playerid][GameSage]);
SCM(playerid,ZELENA,string);
}
format(spawnstring,sizeof(spawnstring),"~n~~n~~n~~n~~r~DOBRODOSAO~n~~w~%s",spawnime);
GameTextForPlayer(playerid,spawnstring,4000,5);
new vime[MAX_PLAYER_NAME],mime[MAX_PLAYER_NAME],lime[MAX_PLAYER_NAME];
new pime[MAX_PLAYER_NAME],bime[MAX_PLAYER_NAME];
RPIme(playerid,vime);
RPIme(playerid,mime);
RPIme(playerid,lime);
RPIme(playerid,pime);
RPIme(playerid,bime);
if(PlayerInfo[playerid][Vozilo] != -1)
{
new i = PlayerInfo[playerid][Vozilo];
if(strcmp(VInfo[i][vVlasnik],vime,true))
{
SCM(playerid,ORANGE,"[Greska] - Vozilo koje se nalazi u vasem racunu nije vise u vasem vlasnistvu!");
}
else
{
DestroyVehicle(VInfo[i][vownedvehicle]);
VInfo[i][vownedvehicle] = CreateVehicle_H(VInfo[i][vModel],VInfo[i][vPozX],VInfo[i][vPozY],VInfo[i][vPozZ],VInfo[i][vPozA],VInfo[i][vBoja1],VInfo[i][vBoja2],-1);
SetVehicleToRespawn(VInfo[i][vownedvehicle]);
IgracevoVozilo[playerid] = i;
}
}
if(PlayerInfo[playerid][Motor] != -1)
{
new i = PlayerInfo[playerid][Motor];
if(strcmp(MInfo[i][mVlasnik],mime,true))
{
SCM(playerid,ORANGE,"[Greska] - Motor koji se nalazi u vasem racunu nije vise u vasem vlasnistvu!");
}
else
{
DestroyVehicle(MInfo[i][mownedvehicle]);
MInfo[i][mownedvehicle] = CreateVehicle_H(MInfo[i][mModel],MInfo[i][mPozX],MInfo[i][mPozY],MInfo[i][mPozZ],MInfo[i][mPozA],MInfo[i][mBoja1],MInfo[i][mBoja2],1000);
IgracevMotor[playerid] = i;
}
}
if(PlayerInfo[playerid][Letjelica] != -1)
{
new i = PlayerInfo[playerid][Letjelica];
if(strcmp(LInfo[i][lhVlasnik],lime,true))
{
SCM(playerid,ORANGE,"[Greska] - Letjelica koja se nalazi u vasem racunu nije vise u vasem vlasnistvu!");
}
else
{
DestroyVehicle(LInfo[i][lownedvehicle]);
LInfo[i][lownedvehicle] = CreateVehicle_H(LInfo[i][lhModel],LInfo[i][lhPozX],LInfo[i][lhPozY],LInfo[i][lhPozZ],LInfo[i][lhPozA],LInfo[i][lhBoja1],LInfo[i][lhBoja2],1000);
IgracevaLetjelica[playerid] = i;
}
}
if(PlayerInfo[playerid][Plovilo] != -1)
{
new i = PlayerInfo[playerid][Plovilo];
if(strcmp(PInfo[i][phVlasnik],pime,true))
{
SCM(playerid,ORANGE,"[Greska] - Plovilo koje se nalazi u vasem racunu nije vise u vasem vlasnistvu!");
}
else
{
DestroyVehicle(PInfo[i][pownedvehicle]);
PInfo[i][pownedvehicle] = CreateVehicle_H(PInfo[i][phModel],PInfo[i][phPozX],PInfo[i][phPozY],PInfo[i][phPozZ],PInfo[i][phPozA],PInfo[i][phBoja1],PInfo[i][phBoja2],1000);
IgracevoPlovilo[playerid] = i;
}
}
if(PlayerInfo[playerid][Biciklo] != -1)
{
new i = PlayerInfo[playerid][Biciklo];
if(strcmp(BInfo[i][bhVlasnik],bime,true))
{
SCM(playerid,ORANGE,"[Greska] - Biciklo koje se nalazi u vasem racunu nije vise u vasem vlasnistvu!");
}
else
{
DestroyVehicle(BInfo[i][bownedvehicle]);
BInfo[i][bownedvehicle] = CreateVehicle_H(BInfo[i][bhModel],BInfo[i][bhPozX],BInfo[i][bhPozY],BInfo[i][bhPozZ],BInfo[i][bhPozA],BInfo[i][bhBoja1],BInfo[i][bhBoja2],1000);
IgracevoBiciklo[playerid] = i;
}
}
new ip[50],ipquery[512];
GetPlayerIp(playerid,ip,50);
mysql_format(mysql,ipquery,sizeof(ipquery),"SELECT * FROM `ip banovi` WHERE `IP` = '%s'",ip);
mysql_tquery(mysql,ipquery,"IPProvjera","i",playerid);
if(PlayerInfo[playerid][Banovan] == 1)
{
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SCM(playerid,-1,"");
SetPlayerPos_H(playerid,-2486.8174,1386.1322,20.3487);
SetPlayerCameraPos(playerid,-2493.6025,1408.7750,26.3313);
SetPlayerCameraLookAt(playerid,-2583.5493,1598.5861,58.8296);
SCM(playerid,0xDB023EFF,"G-Protect: {FFFFFF}Vas korisnicki racun je trenutno iskljucen sa servera! Izbaceni ste!");
SetPlayerScore(playerid,PlayerInfo[playerid][Level]);
SetTimerEx("Izbaciga",1000,false,"d",playerid);
return 1;
}
if(PlayerInfo[playerid][OffBanovan] == 1)
{
new offbanime[MAX_PLAYER_NAME],offquery[512];
RPIme(playerid,offbanime);
mysql_format(mysql,offquery,512,"SELECT `OffBanRazlog` FROM `users` WHERE `Nick` = '%e'",offbanime);
mysql_tquery(mysql,offquery,"OffBanRazlogProvjera","i",playerid);
return 1;
}
if(PlayerInfo[playerid][ABanovan] == 1)
{
new gbanime[MAX_PLAYER_NAME],aquery[512];
RPIme(playerid,gbanime);
mysql_format(mysql,aquery,512,"SELECT `ABanRazlog` FROM `users` WHERE `Nick` = '%e'",gbanime);
mysql_tquery(mysql,aquery,"GProtectBanRazlogProvjera","i",playerid);
return 1;
}
return 1;
}