Specoff giving me errorrs :&
#1

FULL COMMANDS :

pawn Код:
CMD:spec(playerid, params[])
{
    new id;
    if(PlayerInfo[playerid][pAdmin] >= 3 )
    {
        if(sscanf(params,"u", id))
            return SendClientMessage(playerid, DEEPPINK, "USAGE: /spec <id>");

        if(id == playerid)
            return SendClientMessage(playerid,DEEPPINK,"ERROR: You can't spec yourself.");

        if(id == INVALID_PLAYER_ID)
            return SendClientMessage(playerid, DEEPPINK, "ERROR: Player is not connected.");

        if(IsSpecing[playerid] == 1)
            return SendClientMessage(playerid,DEEPPINK,"ERROR: You are already specing someone.");

        GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
        Inter[playerid] = GetPlayerInterior(playerid);
        vWorld[playerid] = GetPlayerVirtualWorld(playerid);
        TogglePlayerSpectating(playerid, true);

        if(IsPlayerInAnyVehicle(id))
        {
            if(GetPlayerInterior(id) > 0)
            {
                SetPlayerInterior(playerid,GetPlayerInterior(id));
            }
            if(GetPlayerVirtualWorld(id) > 0)
            {
                SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
            }
            PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));
        }
        else
        {
            if(GetPlayerInterior(id) > 0)
            {
                SetPlayerInterior(playerid,GetPlayerInterior(id));
            }
            if(GetPlayerVirtualWorld(id) > 0)
            {
                SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
            }
            PlayerSpectatePlayer(playerid,id);
        }
       
        GetPlayerName(id, Name, sizeof(Name));
        format(String, sizeof(String),"You have started to spectate %s.",Name);
        SendClientMessage(playerid, GREY, String);
       
        IsSpecing[playerid] = 1;
        IsBeingSpeced[id] = 1;
        spectatorid[playerid] = id;
        return 1;
}

CMD:specoff(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        {
          if(IsSpecing[playerid] == 0)
                return SendClientMessage(playerid, DEEPPINK, "ERROR: You are not spectating anyone.");
        }
        else
        {
            TogglePlayerSpectating(playerid, 0);
        }
    }
    else return SendClientMessage(playerid, DEEPPINK, "ERROR: You must be level 3 to use this command!");
    return 1;
}
ERROR

Код:
C:\Users\user7\Desktop\extensionss\Server\gamemodes\new.pwn(1400) : warning 217: loose indentation
C:\Users\user7\Desktop\extensionss\Server\gamemodes\new.pwn(1400) : error 029: invalid expression, assumed zero
C:\Users\user7\Desktop\extensionss\Server\gamemodes\new.pwn(1400) : error 017: undefined symbol "cmd_specoff"
C:\Users\user7\Desktop\extensionss\Server\gamemodes\new.pwn(1400) : error 029: invalid expression, assumed zero
C:\Users\user7\Desktop\extensionss\Server\gamemodes\new.pwn(1400) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

Help plese :&
Reply
#3

You are missing a bracket after the final return on CMDpec
Reply
#4

pawn Код:
CMD:specoff(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if(IsSpecing[playerid] == 1)
        {
            TogglePlayerSpectating(playerid, 0);
        }
        else return SendClientMessage(playerid, DEEPPINK, "ERROR: You are not spectating anyone.");
    }
    else return SendClientMessage(playerid, DEEPPINK, "ERROR: You must be level 3 to use this command!");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)