Wanted level error -
Baumann - 15.08.2013
hey why i get these errors?
PHP код:
new WLD;
forward WantedLevelDown(playerid);
WLD = SetTimerEx("WantedLevelDown", 60000, 1, "i", UserID);
public WantedLevelDown(playerid)
{
if(File[playerid][WantedLevel] == 6) { SetPlayerWantedLevel(playerid, 5); File[playerid][WantedLevel] = 5; }
else if(File[playerid][WantedLevel] == 5) { SetPlayerWantedLevel(playerid, 4); File[playerid][WantedLevel] = 4; }
else if(File[playerid][WantedLevel] == 4) { SetPlayerWantedLevel(playerid, 3); File[playerid][WantedLevel] = 3; }
else if(File[playerid][WantedLevel] == 3) { SetPlayerWantedLevel(playerid, 2); File[playerid][WantedLevel] = 2; }
else if(File[playerid][WantedLevel] == 2) { SetPlayerWantedLevel(playerid, 1); File[playerid][WantedLevel] = 1; }
else if(File[playerid][WantedLevel] == 1)
{
SetPlayerWantedLevel(playerid, 0);
File[playerid][WantedLevel] = 0;
KillTimer(WLD);
SendClientMessage(playerid, yellow, "[INFO] You are no longer wanted.");
}
return 1;
}
error 010: invalid function or declaration
error 017: undefined symbol "File"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed 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