Run timer error 6:Invalid Instruction
#1

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
Reply
#2

Is this
pawn Код:
[public OnPlayerConnect(playerid)
in your code or you made a mistake on writing.
Reply
#3

Thats a mistake copying here
Reply
#4

Is your function LoadStats there? Have you tried use "print" to debug messages and see if LoadStats function is being parsed before the crash?
Reply
#5

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....
Reply
#6

Add prints into OnPlayerConnect after each line and see what happens
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)