18.10.2013, 22:41
Greetings
Hello sa-mp today I was making the police system to my server when I complie I get this errors:
And this is all my whole script:
If anyone can help me,
Regards.
Pablo.
Hello sa-mp today I was making the police system to my server when I complie I get this errors:
pawn Код:
C:\Users\usuario\Sa-Mp\gamemodes\Game.pwn(716) : warning 219: local variable "classid" shadows a variable at a preceding level
C:\Users\usuario\Sa-Mp\gamemodes\Game.pwn(766) : warning 211: possibly unintended assignment
C:\Users\usuario\Sa-Mp\gamemodes\Game.pwn(777) : error 035: argument type mismatch (argument 2)
C:\Users\usuario\Sa-Mp\gamemodes\Game.pwn(790) : error 017: undefined symbol "params"
C:\Users\usuario\Sa-Mp\gamemodes\Game.pwn(790) : warning 215: expression has no effect
C:\Users\usuario\Sa-Mp\gamemodes\Game.pwn(790) : error 001: expected token: ";", but found "]"
C:\Users\usuario\Sa-Mp\gamemodes\Game.pwn(790) : error 029: invalid expression, assumed zero
C:\Users\usuario\Sa-Mp\gamemodes\Game.pwn(790) : fatal error 107: too many error messages on one line
pawn Код:
new IsCop[MAX_PLAYERS];
CMD:ta(playerid, params[])
{
if(!sscanf(params, "u", params[0]))
{
if(!IsPlayerConnected(params[0]))
{
if(IsCop[playerid] = 1)
{
TogglePlayerControllable(params[0], 0);
{
new string[128];
format(string, sizeof(string), "{FF0000}TAZED: You have been tazed by cop %s for 2.5", GetName(playerid));
SendClientMessage(params[0], -1, string);
GameTextForPlayer(params[0], "~r~TAZED", 5000, 4);
format(string, sizeof(string), "TAZED: You have tazed the player %s for 2.5 seconds", GetName(params[0]));
SendClientMessage(playerid, COL_BLUE, string); //HERE
}
SetTimer("TazedPlayer", 25000, false);
} else SendClientMessage(playerid, -1, "{FF0000}ERROR: You are not a cop, you are not allowed to use this command");
} else SendClientMessage(playerid, -1, "ERROR: That player is not connected");
} else SendClientMessage(playerid, -1, "{878787}USAGE: /ta(ze) [id]");
return 1;
}
forward TazedPlayer();
public TazedPlayer()
{
TogglePlayerControllable(params[0], 1); // AND HERE SPECCIALY
{
GameTextForPlayer(params[0], "~r~UNTAZED", 5000, 4);
}
}
Regards.
Pablo.