#1

Код:
new tele_Enabled[MAX_PLAYERS]; // Global scope


public OnPlayerClickMap(playerid, FLoat:fX, Float:fY, Float:fZ) //error 025: function heading differs from prototype
{
    if(tele_Enabled[playerid == 1 && PlayerInfo[playerid][pAdmin] >= 2)
    {
        SetPlayerPosFindZ(playerid, fX, fY, fZ); //warning 213: tag mismatch
    }
    else break; //error 024: "break" or "continue" is out of context
    return 1;
}

CMD:togglemaptp(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, WHITE, "ERR: You cannot use this command!"): //error 001: expected token: ";", but found ":"  & error 029: invalid expression, assumed zero & warning 215: expression has no effect

    if(tele_Enabled[playerid] == 0)  //error 001: expected token: ";", but found "if" & fatal error 107: too many error messages on one line
    {
        tele_Enabled[playerid] = 1;
        SendClientMessage(playerid, WHITE, "You have enabled map teleporting."):
    }
    else
    {
        tele_Enabled[playerid] = 0;
        SendClientMessage(playerid, WHITE, "You have disabled map teleporting.");
    }
    return 1;
}
Код:
 error 025: function heading differs from prototype
 error 001: expected token: "]", but found ")"
 warning 213: tag mismatch
 error 024: "break" or "continue" is out of context
 error 001: expected token: ";", but found ":"
 error 029: invalid expression, assumed zero
 warning 215: expression has no effect
 error 001: expected token: ";", but found "if"
 fatal error 107: too many error messages on one line
Reply
#2

where line error ?
Reply
#3

change
Код:
if(tele_Enabled[playerid == 1 && PlayerInfo[playerid][pAdmin] >= 2)
To
Код:
if(tele_Enabled[playerid] == 1 && PlayerInfo[playerid][pAdmin] >= 2)
also instead of else break; try doing else return 0;


And you added a : here so remove it and add a semicolon ;
Код:
return SendClientMessage(playerid, WHITE, "ERR: You cannot use this command!");
Reply
#4

code
Код HTML:
SendClientMessage(playerid, WHITE, "You have enabled map teleporting."):
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, WHITE, "ERR: You cannot use this command!"):
change
Код HTML:
SendClientMessage(playerid, WHITE, "You have enabled map teleporting.");
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, WHITE, "ERR: You cannot use this command!");{
Reply
#5

All of the errors are in the script, so look at them now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)