SA-MP Forums Archive
Wanted level error - 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: Wanted level error (/showthread.php?tid=458193)



Wanted level error - Baumann - 15.08.2013

hey why i get these errors?
PHP код:
  new WLD;
          
forward WantedLevelDown(playerid);
          
WLD SetTimerEx("WantedLevelDown"600001"i"UserID);
          public 
WantedLevelDown(playerid)
{
    if(
File[playerid][WantedLevel] == 6) { SetPlayerWantedLevel(playerid5); File[playerid][WantedLevel] = 5; }
    else if(
File[playerid][WantedLevel] == 5) { SetPlayerWantedLevel(playerid4); File[playerid][WantedLevel] = 4; }
    else if(
File[playerid][WantedLevel] == 4) { SetPlayerWantedLevel(playerid3); File[playerid][WantedLevel] = 3; }
    else if(
File[playerid][WantedLevel] == 3) { SetPlayerWantedLevel(playerid2); File[playerid][WantedLevel] = 2; }
    else if(
File[playerid][WantedLevel] == 2) { SetPlayerWantedLevel(playerid1); File[playerid][WantedLevel] = 1; }
    else if(
File[playerid][WantedLevel] == 1)
    {
        
SetPlayerWantedLevel(playerid0);
        
File[playerid][WantedLevel] = 0;
        
KillTimer(WLD);
        
SendClientMessage(playeridyellow"[INFO] You are no longer wanted.");
    }
    return 
1;
}
error 010invalid function or declaration
error 017
undefined symbol "File"
warning 215expression has no effect
error 001
expected token";"but found "]"
error 029invalid expressionassumed zero
fatal error 107
too many error messages on one line 



Re: Wanted level error - dEcooR - 15.08.2013

Show me your enum - File[MAX_PLAYERS][file]


Re: Wanted level error - Baumann - 15.08.2013

i dont got e num


Re: Wanted level error - IceBilizard - 15.08.2013

check in the script like this
pawn Код:
enum pInfo
{
WantedLevel
}
new file[MAX_PLAYERS][pInfo];
if not have then this is the problem of errors


Re: Wanted level error - Baumann - 15.08.2013

i took the rando script on the internet , i need a wanted starts goes away if type /clearwanted
but i need it be in format COMMAND:


Re: sloved - Baumann - 15.08.2013

ok....


Re: Wanted level error - IceBilizard - 15.08.2013

This not possible you need to give id then its possible to remove wanted start of playerid which are target and you need to create another cmd for remove wanted

Like

pawn Код:
COMMANDetwanted(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You need to be admin to use this command!");
new Target, Level;
if(!sscanf(params, "ui", Target, Level))
{
new string[128], string1[128], myname[24], targetname[24];
GetPlayerName(playerid, myname, 24);GetPlayerName(Target, targetname, 24);
SetPlayerWantedLevel(Target, Level);
format(string, sizeof string, "%s changed your wanted level. ", myname);
format(string1, sizeof string1, "You changed %s's wanted level. ", targetname);
SendClientMessage(playerid, -1, string1);
SendClientMessage(Target, -1, string);
} else return SendClientMessage(playerid, -1, "Usage: /setwanted [playerid] [wanted level]");
return 1;
}

pawn Код:
COMMAND:removewanted(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You need to be admin to use this command!");
new Target;
if(!sscanf(params, "u", Target))
{
new string[128], string1[128], myname[24], targetname[24];
GetPlayerName(playerid, myname, 24);GetPlayerName(Target, targetname, 24);
SetPlayerWantedLevel(Target, 0);
format(string, sizeof string, "%s changed your wanted level. ", myname);
format(string1, sizeof string1, "You changed %s's wanted level. ", targetname);
SendClientMessage(playerid, -1, string1);
SendClientMessage(Target, -1, string);
} else return SendClientMessage(playerid, -1, "Usage: /removewanted [playerid]");
return 1;
}



Re: Wanted level error - Baumann - 15.08.2013

Thanx it worked


Re: Wanted level error - Baumann - 15.08.2013

remove posts pealse.. i spammed so much of this problem