SA-MP Forums Archive
[Ajuda] Dando erro na ultima linha do gm - 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] Dando erro na ultima linha do gm (/showthread.php?tid=534912)



Dando erro na ultima linha do gm - Sobrevizion - 31.08.2014

Bom meuGm termina com a callback OnDialogResponse...
Dai eu compilo e da erro naultima linha e n consigo arrumar se alguem pder ajudar mim ajuda

Final dele:

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if(
dialogid == 102)
{
if(
response)
{
if(
listitem == 0)
{
SetPlayerPos(playerid,2563.8127,2819.5911,27.8203);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,34200);
}
}
if(
listitem == 1)
{
SetPlayerPos(playerid,2658.8005,2661.3188,38.0469);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,34200);
}
}
if(
listitem == 2)
{
SetPlayerPos(playerid,2717.6606,2772.4148,77.3594);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,34200);
return 
1;
//FIM 



Re: Dando erro na ultima linha do gm - Spectral - 31.08.2014

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 102)
    {
        if(response)
        {
            if(listitem == 0)
            {
            SetPlayerPos(playerid,2563.8127,2819.5911,27.8203);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,34, 200);
            }
            if(listitem == 1)
            {
            SetPlayerPos(playerid,2658.8005,2661.3188,38.0469);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,34, 200);
            }
            if(listitem == 2)
            {
            SetPlayerPos(playerid,2717.6606,2772.4148,77.3594);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,34, 200);
            }
            return 1;
}



Re: Dando erro na ultima linha do gm - Sobrevizion - 31.08.2014

C:\JOAO\AREБ SAMP\Criando GM\gamemodes\SUF.pwn(803) : error 030: compound statement not closed at the end of file (started at line 781)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

linha 803 n existe
linha 781:

if(response)


Re: Dando erro na ultima linha do gm - Andre02 - 01.09.2014

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 102)
    {
        if(response)
        {
            if(listitem == 0)
            {
            SetPlayerPos(playerid,2563.8127,2819.5911,27.8203);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,34, 200);
            }
            if(listitem == 1)
            {
            SetPlayerPos(playerid,2658.8005,2661.3188,38.0469);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,34, 200);
            }
            if(listitem == 2)
            {
            SetPlayerPos(playerid,2717.6606,2772.4148,77.3594);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,34, 200);
            }
            }
            return 1;
}



Re: Dando erro na ultima linha do gm - Sobrevizion - 01.09.2014

C:\JOAO\AREБ SAMP\Criando GM\gamemodes\SUF.pwn(804) : error 030: compound statement not closed at the end of file (started at line 779)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

linha 804 n existe


Re: Dando erro na ultima linha do gm - MultiKill - 01.09.2014

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 102)
    {
        if(response)
        {
            if(listitem == 0)
            {
            SetPlayerPos(playerid,2563.8127,2819.5911,27.8203);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,34, 200);
            }
            if(listitem == 1)
            {
            SetPlayerPos(playerid,2658.8005,2661.3188,38.0469);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,34, 200);
            }
            if(listitem == 2)
            {
            SetPlayerPos(playerid,2717.6606,2772.4148,77.3594);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,34, 200);
            }
        }
    }
    return 1;
}



Re: Dando erro na ultima linha do gm - Sobrevizion - 01.09.2014

C:\JOAO\AREБ SAMP\Criando GM\gamemodes\SUF.pwn(805) : warning 203: symbol is never used: "Textdraw4"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

Pra variar a linha n existe e a textdraw n Carrega :\

ve ai a textdraw:

public OnGameModeInit()
{
UsePlayerPedAnims();
SetGameModeText("Brasil FreeRoam");
Textdraw0 = TextDrawCreate(485.000000, 103.000000, "SubUrban 0.3z");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 3);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -65281);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);

Textdraw1 = TextDrawCreate(303.000000, 402.000000, "FreeRoam By: SoBreViZioN_[x] - 2014-2015©");
TextDrawAlignment(Textdraw1, 2);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 3);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, 16777215);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, -16776961);
TextDrawTextSize(Textdraw1, 23.000000, -783.000000);

PS: n postei o fimde ongamemodeinit


Re: Dando erro na ultima linha do gm - MultiKill - 01.09.2014

Й sу traduzir a mensagem do erro. Significa que o simbolo Textdraw4 nunca й usado. Vocк declarou uma variбvel e nгo a usou.