What is wrong
#1

My pawno is giving 26 errors


PHP код:
if (strcmp(cmdtext"/lock"true)==0)
    {
    if(
PlayerInfo[playerid][pDonateRank] >= 2)
    {
    print(
"Car locked");
    if(
IsPlayerInAnyVehicle(playerid))
    {
    new 
State=GetPlayerState(playerid);
    if(
State!=PLAYER_STATE_DRIVER)
    {
    
SendClientMessage(playerid,0xFFFF00AA,"You must be an driver to do this.");
    return 
1;
    }
    new 
i;
    for(
i=0;i<MAX_PLAYERS;i++)
    {
    if(
!= playerid)
    {
    
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i01);
    }
    }
    
SendClientMessage(playerid0xFFFF00AA"Car locked!");
    new 
Float:pXFloat:pYFloat:pZ;
    
GetPlayerPos(playerid,pX,pY,pZ);
    
PlayerPlaySound(playerid,1056,pX,pY,pZ);
    }
    else
    {
    
SendClientMessage(playerid0xFFFF00AA"You don't have an car.");
    }
    return 
1;
    } 
PHP код:
  if (strcmp(cmdtext"/unlock"true)==0)
    {
    if(
PlayerInfo[playerid][pDonateRank] >= 2)
    {
    print(
"Car unlocked");
    if(
IsPlayerInAnyVehicle(playerid))
    {
    new 
State=GetPlayerState(playerid);
    if(
State!=PLAYER_STATE_DRIVER)
    {
    
SendClientMessage(playerid,0xFFFF00AA,"You must be an driver to do this.");
    return 
1;
    }
    new 
i;
    for(
i=0;i<MAX_PLAYERS;i++)
    {
    
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i00);
    }
    
SendClientMessage(playerid0xFFFF00AA"Car unlocked.");
    new 
Float:pXFloat:pYFloat:pZ;
    
GetPlayerPos(playerid,pX,pY,pZ);
    
PlayerPlaySound(playerid,1057,pX,pY,pZ);
    }
    else
    {
    
SendClientMessage(playerid0xFFFF00AA"You don't have an car.");
    }
    return 
1;
    } 
Reply
#2

Can we see the errors?
Reply
#3

Quote:
Originally Posted by Sphex
Посмотреть сообщение
Can we see the errors?
Ye,there is no way we can help without the errors or the problem you are experiencing
Reply
#4

pawn Код:
if (strcmp(cmdtext, "/unlock", true)==0)
{
    if(PlayerInfo[playerid][pDonateRank] >= 2)
    {
        print("Car unlocked");
        if(IsPlayerInAnyVehicle(playerid))
        {
            new State=GetPlayerState(playerid);
            if(State!=PLAYER_STATE_DRIVER)
            {
                SendClientMessage(playerid,0xFFFF00AA,"You must be an driver to do this.");
                return 1;
            }
            new i;
            for(i=0;i<MAX_PLAYERS;i++)
            {
                SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
            }
            SendClientMessage(playerid, 0xFFFF00AA, "Car unlocked.");
            new Float:pX, Float:pY, Float:pZ;
            GetPlayerPos(playerid,pX,pY,pZ);
            PlayerPlaySound(playerid,1057,pX,pY,pZ);
        }
        else
        {
            SendClientMessage(playerid, 0xFFFF00AA, "You don't have an car.");
        }
        return 1;
    }
}
pawn Код:
if (strcmp(cmdtext, "/lock", true)==0)
{
    if(PlayerInfo[playerid][pDonateRank] >= 2)
    {
        print("Car locked");
        if(IsPlayerInAnyVehicle(playerid))
        {
            new State=GetPlayerState(playerid);
            if(State!=PLAYER_STATE_DRIVER)
            {
                SendClientMessage(playerid,0xFFFF00AA,"You must be an driver to do this.");
                return 1;
            }
            new i;
            for(i=0;i<MAX_PLAYERS;i++)
            {
                if(i != playerid)
                {
                    SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
                }
            }
            SendClientMessage(playerid, 0xFFFF00AA, "Car locked!");
            new Float:pX, Float:pY, Float:pZ;
            GetPlayerPos(playerid,pX,pY,pZ);
            PlayerPlaySound(playerid,1056,pX,pY,pZ);
        }
        else
        {
            SendClientMessage(playerid, 0xFFFF00AA, "You don't have an car.");
        }
            return 1;
    }
}
Two times the same error (one bracket missing)

Quote:
Originally Posted by Passout
Посмотреть сообщение
Ye,there is no way we can help without the errors or the problem you are experiencing
26 errors is bracket missing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)