Jump to content
  • 0

Dialog


mura

Question

Deci imi da o eroare la compilare.

D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(283) : warning 217: loose indentation

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Warning.

Am pus asa:

ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");

si

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

{

if(response)// They pressed the first button.

    {

    switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.

        {

case 1:// Our dialog!

        {

          switch(listitem)// Checking which listitem was selected

        {

            case 0:// The first item listed

            {

                if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");

                GivePlayerMoney(playerid, -1);

                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);

            }

            case 1: // The second item listed

            {

                if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");

                GivePlayerMoney(playerid, -2);

                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);

            }

            case 2: // The third item listed

            {

                if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");

                GivePlayerMoney(playerid, -3);

                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);

            }

        }

        }

}

    }

return 1;

}

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

am vrut sa pun la

public OnPlayerEnterCheckpoint(playerid)

{

ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");

DisablePlayerCheckpoint(playerid);

return 1;

} asta.Nu mere cand intra in chekpoint apare dialogul dar cand dau click nu se int nik

Link to comment
Share on other sites

am vrut sa pun la

public OnPlayerEnterCheckpoint(playerid)

{

ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");

DisablePlayerCheckpoint(playerid);

return 1;

} asta

ce dreq ii asta? ti s-a spus rezolvarea TC!...

Fara reclama in semnatura!

Link to comment
Share on other sites

pai aia am pus pt dialog..Eu am pus un checkpoint si cand intra in checkpoint sa-i apara dialog-ul ala.Cand intri in checkpoint apare meniul cu alea dar cand dai click nu se int nik..eroarea doar dispare no si rezolva

Link to comment
Share on other sites

am vrut sa pun la

public OnPlayerEnterCheckpoint(playerid)

{

ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");

DisablePlayerCheckpoint(playerid);

return 1;

} asta

Sus in script

#define menu1 25
la OnPlayerEnterCheckpoint pui asta
ShowPlayerDialog(playerid, menu1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
la OnDialogResponse ...  pui
if(dialogid==menu1)
	{
     if(response)// They pressed the first button.
        {
    switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
        {
      case 1:// Our dialog!
           {
              switch(listitem)// Checking which listitem was selected
           {
               case 0:// The first item listed
               {
                   if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                   GivePlayerMoney(playerid, -1);
                   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
               }
               case 1: // The second item listed
               {
                   if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                   GivePlayerMoney(playerid, -2);
                   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
               }
               case 2: // The third item listed
               {
                   if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                   GivePlayerMoney(playerid, -3);
                   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
               }
           }
           }
   }
    }
   return 1;
}

daca nici acu nu intelegi

468833_437698_362328_hiphop.jpg
Link to comment
Share on other sites

am facut exact asa si

D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(283) : warning 217: loose indentation

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Warning.

si daca pun aia cu pragma doar dispare problema..pentru ca, cand intru in checkpoint apare meniul dar cand da click nu se int nik

Link to comment
Share on other sites

am facut exact asa si

D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(283) : warning 217: loose indentation

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Warning.

si daca pun aia cu pragma doar dispare problema..pentru ca, cand intru in checkpoint apare meniul dar cand da click nu se int nik

Deci ... sus in script pui

#pragma tabsize 0

Asta e sa nu mai dea warnuri cu "loose indentation", nu are legatura cu checkpointul sau meniul, meniul nu merge pentru ca trebuie schimbat ID-ul lui.

Link to comment
Share on other sites

am facut exact asa si

D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(283) : warning 217: loose indentation

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Warning.

si daca pun aia cu pragma doar dispare problema..pentru ca, cand intru in checkpoint apare meniul dar cand da click nu se int nik

1).#pragma tabsize 0 (cum a zis si stuntman

2).pune asta la ondialogresponse (schimbo cu care ai puso inainte)

if(dialogid==menu1)
	{
     if(response)// They pressed the first button.
        {
    switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
        {
      case 1:// Our dialog!
           {
              switch(listitem)// Checking which listitem was selected
           {
               case 0:// The first item listed
               {
                   if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                   GivePlayerMoney(playerid, -1);
                   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
               }
               case 1: // The second item listed
               {
                   if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                   GivePlayerMoney(playerid, -2);
                   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
               }
               case 2: // The third item listed
               {
                   if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                   GivePlayerMoney(playerid, -3);
                   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
               }
           }
           }
   }
    }
   return 1;
}

468833_437698_362328_hiphop.jpg
Link to comment
Share on other sites

D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(255) : error 017: undefined symbol "menu1"

D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(287) : warning 217: loose indentation

D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(290) : error 029: invalid expression, assumed zero

D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(290) : error 004: function "OnPlayerClickPlayer" is not implemented

D:\Jocuri\Rockstar Games\GTA San Andreas\Server\gamemodes\RP.pwn(294) : error 030: compound statement not closed at the end of file (started at line 255)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

Link to comment
Share on other sites

u trb doar sa schimbi ce ai pus inainte la ondialogresponse cu ce tiam dat mai sus

Sus in script

#define menu1 25
la OnPlayerEnterCheckpoint pui asta
ShowPlayerDialog(playerid, menu1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
OnDialogResponse
if(dialogid==menu1)
	{
     if(response)// They pressed the first button.
        {
    switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
        {
      case 1:// Our dialog!
           {
              switch(listitem)// Checking which listitem was selected
           {
               case 0:// The first item listed
               {
                   if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                   GivePlayerMoney(playerid, -1);
                   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
               }
               case 1: // The second item listed
               {
                   if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                   GivePlayerMoney(playerid, -2);
                   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
               }
               case 2: // The third item listed
               {
                   if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
                   GivePlayerMoney(playerid, -3);
                   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
               }
           }
           }
   }
    }
   return 1;
}

Hai ca deja facem OFFTopic

468833_437698_362328_hiphop.jpg
Link to comment
Share on other sites

Daca nu vrei sa pricepi asta e, oi vrea sa intram la tine in PC sa vedem ce porcarii faci tu, mai incearca si merge 100%, e bine cum am zis eu si cu Ryder_RO.

Tu vrei sa-ti spunem exact unde sa pui ? Dupa linia ... pui ... (parca stim noi cum ai tu GM), da-ti si tu seama. Nu suport cand va vad asa. Am fost si eu incepator, dar nu chiar asa... (nu am tinut-o mult asa cel putin)

/locked

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.