Jump to content

Question

Posted

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;

}

16 answers to this question

Recommended Posts

Posted

nu e o eroare

e un warning

scapi de el prin urmatoarele

ori unde ai pragma pui

#pragma tabsize 0

sau

te duci la linia 283 si o faci cum trebuie (as faceo eu dar nush care e:))]

468833_437698_362328_hiphop.jpg
Posted

nu am inteles absolut nimic :-s...ce pragma?

pragma are mai multe optiuni, printre care si tabsize, cu el poti scapa de orice avertizare cu "loose identitation" din script punand sus in script

#pragma tabsize 0

Posted

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

Posted

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!

Posted

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

Posted

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
Posted

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

Posted

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.

Posted

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
Posted

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.

Posted

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
Posted

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

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.