27.09.2016, 16:02
Hello, I'm making a few new commands but getting a error and I cant find the problem ?
warning:
Command:
warning:
Код:
Roleplay\gamemodes\RP.pwn(23697) : warning 217: loose indentation Roleplay\gamemodes\RP.pwn(23705) : warning 225: unreachable code Roleplay\gamemodes\RP.pwn(23705) : warning 217: loose indentation Roleplay\gamemodes\RP.pwn(23705) : error 029: invalid expression, assumed zero Roleplay\gamemodes\RP.pwn(23706) : warning 217: loose indentation 1 Error.
Command:
PHP код:
CMD:giveweaponlic(playerid, params[])
{
new giveplayerid, string[125];
if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(PlayerInfo[giveplayerid][pGunLic] == 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "This player already has a weapon license.");
}
format(string, sizeof(string), "You have given a weapon license to %s.",GetPlayerNameEx(giveplayerid));
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Officer %s has given you a weapon license.",GetPlayerNameEx(playerid));
SendClientMessage(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), "Officer %s has given a weapon license to %s.",GetPlayerNameEx(playerid),GetPlayerNameEx(giveplayerid));
Log("logs/licenses.log", string);
PlayerInfo[giveplayerid][pGunLic] = 1;
return 1;
else
{
SendClientMessage(playerid, COLOR_WHITE, "You are not a police officer!");
}
}
return 1;
}