Simplest error and I can't fix it...
#1

pawn Код:
dcmd_annoy(playerid,params[])
{
    #pragma unused params
    if(PlayerInfo[playerid][LoggedIn] == 1)
    {
        if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
        {
            new tmp[256], tmp2[256], Index;        tmp = strtok(params,Index), tmp2 = strtok(params,Index);
            if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /annoy [playerid] [reason]");
            new player1, playername[MAX_PLAYER_NAME], string[128];
            player1 = strval(tmp);
            if(IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"Player not connected.");
            if(cow_victim != -1) return SendClientMessage(playerid,red,"Sorry! It seems like your cow has already been stolen by another administrator.");
            #if ALLOW_ANNOY == false
                return SendClientMessage(playerid,red,"Sorry! This feature has been disabled.");
            #else
            AnnoyPlayer(player1);
            format(string, sizeof(string),"**COW:  %s  (%d)  (ADMIN COW)  %s ",playername, player1, params[2]); SendClientMessageToAll(COLOR_PINK,string);
            SendClientMessage(playerid,red,"You have released the cow.");
            if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /annoy [playerid] [reason]");
            player1 = strval(tmp);
            #endif
            }
            else
            {
            new playername[MAX_PLAYER_NAME],player1, string[128];
            format(string,sizeof(string),"**COW:  %s (%d)  (ADMIN COW)  No Reason Given.",playername,player1,params[2]); SendClientMessageToAll(COLOR_PINK,string);
            return SendClientMessage(playerid,red,"You have released the cow.");
        } else return SendClientMessage(playerid,red,"You Are Not Authorized To Use That Command.");
    } else return SendClientMessage(playerid,red,"ERROR: You Are Not A High Enough Level To Use This Command.");
}
Here are the errors:

pawn Код:
C:\Documents and Settings\User\Desktop\Las Venturas True Crime\gamemodes\ladmin.pwn(9909) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\Las Venturas True Crime\gamemodes\ladmin.pwn(9909) : error 001: expected token: ";", but found "return"
Line 9909

pawn Код:
} else return SendClientMessage(playerid,red,"You Are Not Authorized To Use That Command.");
Reply
#2

Edit: Gimme 2 seconds
Reply
#3

You missed ';' on your error line. Thats all.
Reply
#4

No, I have ; on every line close to 9909 and where it is needed, but still has the error.
Reply
#5

Код:
dcmd_annoy(playerid,params[]){    #pragma unused params    if(PlayerInfo[playerid][LoggedIn] == 1)    {        if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))        {            new tmp[256], tmp2[256], Index;        tmp = strtok(params,Index), tmp2 = strtok(params,Index);            if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /annoy [playerid] [reason]");            new player1, playername[MAX_PLAYER_NAME], string[128];            player1 = strval(tmp);            if(IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"Player not connected.");            if(cow_victim != -1) return SendClientMessage(playerid,red,"Sorry! It seems like your cow has already been stolen by another administrator.");            #if ALLOW_ANNOY == false                return SendClientMessage(playerid,red,"Sorry! This feature has been disabled.");            #else            AnnoyPlayer(player1);            format(string, sizeof(string),"**COW:  %s  (%d)  (ADMIN COW)  %s ",playername, player1, params[2]); SendClientMessageToAll(COLOR_PINK,string);            SendClientMessage(playerid,red,"You have released the cow.");            if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /annoy [playerid] [reason]");            player1 = strval(tmp);            #endif            }            else            {            new playername[MAX_PLAYER_NAME],player1, string[128];            format(string,sizeof(string),"**COW:  %s (%d)  (ADMIN COW)  No Reason Given.",playername,player1,params[2]); SendClientMessageToAll(COLOR_PINK,string);            return SendClientMessage(playerid,red,"You have released the cow.");        } else return SendClientMessage(playerid,red,"You Are Not Authorized To Use That Command.");    } else return SendClientMessage(playerid,red,"ERROR: You Are Not A High Enough Level To Use This Command.");
return 1;}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)