Errors
#1

^^^^^^^^
Reply
#2

Maybe you're missing something in the code above, can you check that and show us the code?
Reply
#3

^^^^^^^^
Reply
#4

Are the errors gone when you delete/comment that line?

EDIT: I notice there are 9 brackets in total, which is not good. In this case, you need 8 or 10 brackets. Make sure all if statements are opened/closed correctly.
Reply
#5

^^^^^^^^
Reply
#6

Like I said in my post edit, check the brackets, I think it's that.
Reply
#7

Try this:

pawn Код:
CMD:highlight(playerid,params[])
{
    new playername[MAX_PLAYERS];
    if(!IsCnRAdmin(playerid))
        return UnknownCMD(playerid);

    if(!strlen(params))
        return SendClientMessage(playerid, COLOR_RED, "USAGE: /highlight [PlayerID]");
   
    new string[128];
    playerid = strval(params);
    if(IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
    {
        GetPlayerName(playerid, playername, sizeof(playername));
        if(AccInfo[playerid][blip] == 0)
        {
            AdminCMD(playerid, "HIGHLIGHT");
            AccInfo[playerid][pColour] = GetPlayerColor(player1);
            AccInfo[playerid][blip] = 1;
            BlipTimer[player1] = SetTimerEx("HighLight", 1000, 1, "i", player1);
            format(string,sizeof(string),"|- You have Highlighted %s's marker -|", PlayerName);
        }
        else
        {
            KillTimer( BlipTimer[playerid]);
            AccInfo[playerid][blip] = 0;
            SetPlayerColor(player1, AccInfo[player1][pColour]);
            format(string,sizeof(string),"|- You have Stopped Highlighting %s's marker -|", PlayerName);
        }
    }
    else return SendClientMessage(playerid,yellow,string);
    return 1;
}
Remember that proper indentation is key.
Reply
#8

^^^^^^^^
Reply
#9

Perhaps the fact that you're just ripping things from other scripts is why you have a boat load of errors? Have you ever considered looking at the main functions of the code itself and re-writing it to suit your script's needs?
Reply
#10

^^^^^^^^
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)