Run time error 6: "Invalid instruction" -
Youssef214 - 04.07.2014
When Recently, I Added This Command And Typing It:
pawn Код:
COMMAND:reports(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, 0xFF0000AA, "You Are Not A Basic Moderator Or Higher Rank!");
new reporter[24],reported[24],reason[80],line[128],str[1000],temp[130], adminname[MAX_PLAYER_NAME];
new File:file = fopen("Reports.ini", io_read);
GetPlayerName(playerid, adminname, MAX_PLAYER_NAME);
while(fread(file, line))
{
sscanf(line, "p<|>sss", reporter, reported, reason);//to split the line
format(temp, 130, "Reporter: %s || Player Reported: %s || Reason: %s\n", reporter, reported, reason);
strcat(str, temp, 130);
}
ShowPlayerDialog(playerid, DIALOG_REPORTS, DIALOG_STYLE_MSGBOX, "List Of Reports", str, "Close", "");
fclose(file);
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] > 0)
{
new message4[128];
format(message4, sizeof(message4), "[ADM] The {FF0000}%s {FF5900}%s (%d) Has Check The Reports.",AdmRank, adminname, playerid), SendClientMessage(i, 0xFF5900FF, message4);
print(message4);
}
}
return 1;
}
In The Server Console,It Says This:
[14:41:32] [ADM] The {FF0000}Owner {FF5900}[RO]Youssef1000 (91) Has Check The Reports.
[14:41:32] [debug] Run time error 6: "Invalid instruction"
[14:41:32] [debug] Unknown opcode 0x35b2eb0 at address 0x0000006C
[14:41:32] [debug] AMX backtrace:
[14:41:32] [debug] #0 0000006c in public cmd_reports () from LSGW2.amx
[14:41:32] [debug] #1 native CallLocalFunction () [00472ef0] from samp-server.exe
[14:41:32] [debug] #2 000186a8 in ?? (0x00000000, 0x010a9590) from LSGW2.amx
[14:41:32] [debug] #3 0000d28c in public OnPlayerCommandText (0x00000000, 0x010a9590) from LSGW2.amx
And Ingame It Sends The Message That The Owner [RO]Youssef1000 (91)(Problem Here Too From Playerid) Has Check The Reports, And It Sends, SERVER: Unknown command. please help.
Re: Run time error 6: "Invalid instruction" -
gtasarules14 - 04.07.2014
{
if(PlayerInfo[i][pAdmin] > 0)
{
new message4[128];
format(message4, sizeof(message4), "[ADM] The {FF0000}%s {FF5900}%s (%d) Has Check The Reports.",AdmRank, adminname, playerid), SendClientMessage(i, 0xFF5900FF, message4);
print(message4);
}
} <<<< I believe you have an extra bracket, trying removing this
return 1;
}
Re: Run time error 6: "Invalid instruction" -
Youssef214 - 04.07.2014
I will automaticly get those errors:
pawn Код:
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(2713) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3257) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3260) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3261) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3270) : error 017: undefined symbol "Lowrider"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3282) : error 017: undefined symbol "RegularCarDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3306) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3310) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3313) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3320) : error 017: undefined symbol "Mod"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3321) : error 017: undefined symbol "Mod1"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3322) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3330) : error 017: undefined symbol "Mod2"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3331) : error 017: undefined symbol "Mod3"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3332) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3340) : error 017: undefined symbol "Mod2"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3341) : error 017: undefined symbol "Mod3"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3364) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3372) : error 017: undefined symbol "Mod2"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3373) : error 017: undefined symbol "Mod3"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3376) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3392) : error 017: undefined symbol "RegularCarDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3400) : error 017: undefined symbol "RegularCarDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3412) : error 017: undefined symbol "RegularCarDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3415) : error 017: undefined symbol "CarmodDialog"
D:\games\clients\port_2222\gamemodes\LSGW2.pwn(3419) : error 017: undefined symbol "RegularCarDialog"
Re: Run time error 6: "Invalid instruction" -
Dziugsas - 04.07.2014
now you missed somewhere else a bracket...
Re: Run time error 6: "Invalid instruction" -
Youssef214 - 04.07.2014
Can you help me?
Re: Run time error 6: "Invalid instruction" -
Dziugsas - 04.07.2014
Look beetween (2713) and (3419)
Re: Run time error 6: "Invalid instruction" -
Youssef214 - 04.07.2014
It's some other stuff.
Re: Run time error 6: "Invalid instruction" -
Dziugsas - 04.07.2014
Look there for missing brackets.
Re: Run time error 6: "Invalid instruction" -
Youssef214 - 04.07.2014
Nothing, i said in the report command
Re: Run time error 6: "Invalid instruction" -
Dziugsas - 04.07.2014
God...Always indent your stuff , so people can detect the problem.