SA-MP Forums Archive
Fake /showbadge command have 5 errors! help plz! - 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: Fake /showbadge command have 5 errors! help plz! (/showthread.php?tid=294677)



Fake /showbadge command have 5 errors! help plz! - Jakeb9713 - 02.11.2011

Hey there i made a fake /showbadge command for the hitman faction show they can impersonate lspd, fbi ,ng etc. But i have 5 errors that i just can't fix! can anyone help plz!!?? here is it and the errors:

http://pastebin.com/SG43rWBg

And the errors are:

C:\Users\Jake\Documents\SCRP Folder\SCRP MAIN\gamemodes\SCRP.pwn(50979) : error 033: array must be indexed (variable "-unknown-")
C:\Users\Jake\Documents\SCRP Folder\SCRP MAIN\gamemodes\SCRP.pwn(50982) : warning 217: loose indentation
C:\Users\Jake\Documents\SCRP Folder\SCRP MAIN\gamemodes\SCRP.pwn(50982) : error 014: invalid statement; not in switch
C:\Users\Jake\Documents\SCRP Folder\SCRP MAIN\gamemodes\SCRP.pwn(50982) : warning 215: expression has no effect
C:\Users\Jake\Documents\SCRP Folder\SCRP MAIN\gamemodes\SCRP.pwn(50982) : error 001: expected token: ";", but found ":"
C:\Users\Jake\Documents\SCRP Folder\SCRP MAIN\gamemodes\SCRP.pwn(50982) : error 029: invalid expression, assumed zero
C:\Users\Jake\Documents\SCRP Folder\SCRP MAIN\gamemodes\SCRP.pwn(50982) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.


Re: Fake /showbadge command have 5 errors! help plz! - A7X_CEEJAY - 02.11.2011

Can you copy&Paste the lines of "50979","50982 please?


Re: Fake /showbadge command have 5 errors! help plz! - Kingunit - 02.11.2011

You didn't made this. And like A7X said. Paste the lines, we are not going to search them.


Re: Fake /showbadge command have 5 errors! help plz! - A7X_CEEJAY - 02.11.2011

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
You didn't made this. And like A7X said. Paste the lines, we are not going to search them.
His PasteBin only shows the 130 lines of his script, so even if we tried, we'd fail.


Re: Fake /showbadge command have 5 errors! help plz! - Leo_Johnson - 03.11.2011

if(strcmp(cmd, "/showbadge", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /showbadge [playerid/PartOfName]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
giveplayerid = ReturnUser(tmp);
if(IsACop(playerid)) || if(PlayerInfo[playerid][pMember] == 8 [8 is the faction number]
{
if(IsPlayerConnected(para1))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (GetDistanceBetweenPlayers(playerid,giveplayerid) > 5)
{
SendClientMessage(playerid, COLOR_GREY, "You are too far away from that player.");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /showbadge [playerid/PartOfName]");
return 1;
}
format(string, sizeof(string), "* %s flashes their badge to %s.", sendername, giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
format(string, sizeof(string), "%s %s, %s.", GetPlayerRank(playerid),PlayerName(playerid),GetPl ayerFactionName(playerid),sendername);
SendClientMessage(giveplayerid, COLOR_DBLUE, string);
format(string, sizeof(string), "You have shown your badge to %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a Cop / FBI / SASP !");
return 1;
}
}
return 1;
}

try this.....


Re: Fake /showbadge command have 5 errors! help plz! - Jakeb9713 - 04.11.2011

Hey guys here are the lines you wanted:

50979 switch(PlayerInfo[playerid]) {
50982 case 1:
and obviously you can check for them in the paste bin i posted above^^^^
Thanks for the help


Re: Fake /showbadge command have 5 errors! help plz! - wups - 04.11.2011

PlayerInfo[playerid]
should be something like
PlayerInfo[playerid][pJob]