31.05.2013, 06:26
What did I do wrong in this code guys? Help please.
This is the errors.
PHP код:
CMD:god(playerid, params[])
{
if(IsPlayerConnected(playerid))
if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty.");
if(PlayerInfo[playerid][pAdmin] < 2) {
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
return 1;
}
if(GodMode[playerid] == 0)
SendClientMessage(playerid, COLOR_GREY, "You are now in God Mode!");
{
SetPlayerHealth(playerid, 999999);
SetPlayerArmour(playerid, 999999);
}
else if(GodMode[playerid] == 1)
SendClientMessage(playerid, COLOR_GREY, "You have turned off your God Mode!");
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
return 1;
}
Код:
C:\Documents and Settings\USER\Desktop\HGRP\gamemodes\HGRP.pwn(44513) : error 029: invalid expression, assumed zero C:\Documents and Settings\USER\Desktop\HGRP\gamemodes\HGRP.pwn(44513) : warning 215: expression has no effect C:\Documents and Settings\USER\Desktop\HGRP\gamemodes\HGRP.pwn(44513) : error 001: expected token: ";", but found "if" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.