Run timer error 6:Invalid Instruction - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Run timer error 6:Invalid Instruction (
/showthread.php?tid=430337)
Run timer error 6:Invalid Instruction -
dusk - 13.04.2013
full error generated by crash detect:
pawn Код:
[18:16:36] [debug] Run time error 6: "Invalid instruction"
[18:16:36] [debug] Unknown opcode 0x3902494 at address 0x00000038
[18:16:36] [debug] AMX backtrace:
[18:16:36] [debug] #0 00000038 in public OnPlayerConnect () from GangWars.amx
My OnPlayerconnect
pawn Код:
public OnPlayerConnect(playerid)
{
new string[80];
GetPlayerName(playerid,Name,sizeof(Name));
if(fexist(GetPath(playerid)))
{
format(string,sizeof(string),"Sveiki sugrįћę %s, jūs automatiљkai buvote prijungtas",Name);
SendClientMessage(playerid,0xFFFF00FF,string);
INI_ParseFile(GetPath(playerid),"LoadStats_%s", .bExtra = true, .extra = playerid);
}
format(string,sizeof(string),"[Join] %s prisijungė į serverį",Name);
SendClientMessageToAll(0xFF00FFFF,string);
return 1;
}
I found out that without the parse file line it works. But what is wrong with it? It loads everything well, just causes that error
Re: Run timer error 6:Invalid Instruction -
]Rafaellos[ - 13.04.2013
Is this
pawn Код:
[public OnPlayerConnect(playerid)
in your code or you made a mistake on writing.
Re: Run timer error 6:Invalid Instruction -
dusk - 13.04.2013
Thats a mistake copying here
Re: Run timer error 6:Invalid Instruction -
Dark_Kostas - 13.04.2013
Is your function LoadStats there? Have you tried use "print" to debug messages and see if LoadStats function is being parsed before the crash?
Re: Run timer error 6:Invalid Instruction -
dusk - 13.04.2013
pawn Код:
forward LoadStats_user(playerid, name[], value[]);
public LoadStats_user(playerid,name[],value[])
{
new temp[64];
INI_String("Password",temp,128); format(PlayerInfo[playerid][pPass],sizeof(temp),temp);
printf("pass");
INI_Int("AdminLevel",PlayerInfo[playerid][AdminLevel]);
printf("Adminlevel");
INI_Int("XP",PlayerInfo[playerid][XP]);
printf("XP");
INI_Int("Money",PlayerInfo[playerid][Money]);
printf("money");
INI_Int("Kills",PlayerInfo[playerid][Kills]);
printf("kills");
INI_Int("Deaths",PlayerInfo[playerid][Deaths]);
printf("deaths");
SetPlayerScore(playerid,PlayerInfo[playerid][XP]);
printf("Done");
return 1;
}
Here's my loadstats function, and it prints everything out before the crash....
Re: Run timer error 6:Invalid Instruction -
Universal - 13.04.2013
Add prints into OnPlayerConnect after each line and see what happens