SA-MP Forums Archive
[Ajuda] Comando/Hospital - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando/Hospital (/showthread.php?tid=467234)



Comando/Hospital - ThuuGLif3 - 02.10.2013

Bom,Iniciei um Sistema de Hospital, So que em um Comando desse "Sistema" deu error

pawn Код:
C:\Users\-------\Desktop\Server DM\filterscripts\Hospital.pwn(137) : error 030: compound statement not closed at the end of file (started at line 124)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if( !strcmp( cmdtext, "/entrar" ))
    {
    if(IsPlayerInRangeOfPoint(playerid, 1.0, 1172.5526, -1323.2614, 15.4028))
    {
        SetPlayerInterior(playerid, 1);
        SetPlayerPos(playerid, 1177.3695, -1340.4095, 9280.5693);
        GameTextForPlayer(playerid, "~r~Hospital Los Santos", 5000, 1);
        SetPlayerFacingAngle(playerid, 90);
        SetCameraBehindPlayer(playerid);
    }
    else SendClientMessage(playerid, 0xA9C4E4AA, "{FF0000}[ x ]{A9C4E4} Vocк nгo estб no Hospital.");
    return 1;
}



Re: Comando/Hospital - iFucK - 02.10.2013

pawn Код:
if( !strcmp( cmd, "/entrar", true ))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.0, 1172.5526, -1323.2614, 15.4028))
        {
            SetPlayerInterior(playerid, 1);
            SetPlayerPos(playerid, 1177.3695, -1340.4095, 9280.5693);
            GameTextForPlayer(playerid, "~r~Hospital Los Santos", 5000, 1);
            SetPlayerFacingAngle(playerid, 90);
            SetCameraBehindPlayer(playerid);
        }
        else SendClientMessage(playerid, 0xA9C4E4AA, "{FF0000}[ x ]{A9C4E4} Vocк nгo estб no Hospital.");
        return 1;
    }



Re: Comando/Hospital - ThuuGLif3 - 02.10.2013

Obrigado por tentar ajudar,Mais o erro persiste



Re: Comando/Hospital - iFucK - 02.10.2013

pawn Код:
if( !strcmp( cmd, "/entrar", true ))
    {
        if( IsPlayerInRangeOfPoint( playerid, 1.0, 1172.5526, -1323.2614, 15.4028 ))
        {
            SetPlayerInterior(playerid, 1);
            SetPlayerPos(playerid, 1177.3695, -1340.4095, 9280.5693);
            GameTextForPlayer(playerid, "~r~Hospital Los Santos", 5000, 1);
            SetPlayerFacingAngle(playerid, 90);
            SetCameraBehindPlayer(playerid);
            else SendClientMessage( playerid, 0xA9C4E4AA, "{FF0000}[ x ]{A9C4E4} Vocк nгo estб no Hospital.");
            return 1;
        }
        return 1;
    }
@Edit
Pronto!


Re: Comando/Hospital - ThuuGLif3 - 02.10.2013

Erro persiste
@Edit

iFuck,Consegui resolver o erro era o Seguinte...
pawn Код:
if( !strcmp( cmdtext, "/entrar", true ))
    {
        if( IsPlayerInRangeOfPoint( 1.0, playerid, 1172.5526, -1323.2614, 15.4028 ))
        {
            SetPlayerInterior(playerid, 1);
            SetPlayerPos(playerid, 1177.3695, -1340.4095, 9280.5693);
            GameTextForPlayer(playerid, "~r~Hospital Los Santos", 5000, 1);
            SetPlayerFacingAngle(playerid, 90);
            SetCameraBehindPlayer(playerid);
        }
        else SendClientMessage( playerid, 0xA9C4E4AA, "{FF0000}[ x ]{A9C4E4} Vocк nгo estб no Hospital.");
        return 1;
    }
    return 0;
}
Foi adicionado:

pawn Код:
return 0;
}



Re: Comando/Hospital - iFucK - 02.10.2013

Eu editei agorinha lб, foi essa ultima atualizaзгo que deu erro tbm ?


Re: Comando/Hospital - ThuuGLif3 - 02.10.2013

Olhe meu edit ^^
Obrigado por tentar ajudar...



Re: Comando/Hospital - iFucK - 02.10.2013

Bom vocк sу trocou Return 1; para Return 0;
E Eu testei aqui funfou fora isso blz
Boa sorte ae.


Re: Comando/Hospital - .ThePro - 02.10.2013

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if( !strcmp( cmdtext, "/entrar" ))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.0, 1172.5526, -1323.2614, 15.4028))
        {
            SetPlayerInterior(playerid, 1);
            SetPlayerPos(playerid, 1177.3695, -1340.4095, 9280.5693);
            GameTextForPlayer(playerid, "~r~Hospital Los Santos", 5000, 1);
            SetPlayerFacingAngle(playerid, 90);
            SetCameraBehindPlayer(playerid);
        }
        else SendClientMessage(playerid, 0xA9C4E4AA, "{FF0000}[ x ]{A9C4E4} Vocк nгo estб no Hospital.");
        return 1;
    }
    return 0;
}



Re: Comando/Hospital - ThuuGLif3 - 02.10.2013

Quote:
Originally Posted by .ThePro
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if( !strcmp( cmdtext, "/entrar" ))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.0, 1172.5526, -1323.2614, 15.4028))
        {
            SetPlayerInterior(playerid, 1);
            SetPlayerPos(playerid, 1177.3695, -1340.4095, 9280.5693);
            GameTextForPlayer(playerid, "~r~Hospital Los Santos", 5000, 1);
            SetPlayerFacingAngle(playerid, 90);
            SetCameraBehindPlayer(playerid);
        }
        else SendClientMessage(playerid, 0xA9C4E4AA, "{FF0000}[ x ]{A9C4E4} Vocк nгo estб no Hospital.");
        return 1;
    }
    return 0;
}
Pra que repasas-te meu codigo?
Fora isso, Obrigado por tentar... :>