Problem with dialog.
#1

Hello. I have a problem with drink dialog.

PHP код:
CMD:drink(playerid,params[])
{
    
ShowPlayerDialog(playeridDIALOG_DRINKDIALOG_STYLE_LIST,"[BAR] Odaberite piće","Sok od naranče (3$)\nCoca Cola (10$)\nPivo (20$)\nViski (45$)","Odaberi","Izlaz");
    return 
1;

Errors:

PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : error 029invalid expressionassumed zero
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : error 001expected token";"but found ")"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : error 029invalid expressionassumed zero
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Line 201:

PHP код:
    ShowPlayerDialog(playeridDIALOG_DRINKDIALOG_STYLE_LIST,"[BAR] Odaberite piće","Sok od naranče (3$)\nCoca Cola (10$)\nPivo (20$)\nViski (45$)","Odaberi","Izlaz"); 
Dialog:

PHP код:
        case DIALOG_DRINK:
        {
            if(
response)
            {
            
                {
                switch(
listitem)//
                    
{
                        case 
0:
                        {
                            if(
GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid0xFFFFFF"{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
                            
GivePlayerMoney(playerid, -3);
                            
SendClientMessage(playeridBijela,"{00C0FF}WG:{FFFFFF} Kupili ste sok od naranče{FFF1AF} (3$)");
                            
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
                        }
                        case 
1
                        {
                               if(
GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid0xFFFFFF"{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
                            
GivePlayerMoney(playerid, -10);
                            
SendClientMessage(playeridBijela,"{00C0FF}WG:{FFFFFF} Kupili ste Coca Colu{FFF1AF} (10$)");
                            
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
                           }
                        case 
2
                           {
                            if(
GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid0xFFFFFF"{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
                            
GivePlayerMoney(playerid, -20);
                            
SendClientMessage(playeridBijela,"{00C0FF}WG:{FFFFFF} Kupili ste Pivo{FFF1AF} (20$)");
                            
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_BEER);
                        }
                         case 
3:
                           {
                            if(
GetPlayerMoney(playerid) < 45) return SendClientMessage(playerid0xFFFFFF"{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
                            
GivePlayerMoney(playerid, -45);
                            
SendClientMessage(playeridBijela,"{00C0FF}WG:{FFFFFF} Kupili ste Viski{FFF1AF} (45$)");
                            
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_WINE);
                        }
                    
                }
            }
            
       }
       return 
1;

Reply
#2

Bump. I really need help. + REP!
Reply
#3

Quote:
Originally Posted by NoDi522
Посмотреть сообщение
Hello. I have a problem with drink dialog.

PHP код:
CMD:drink(playerid,params[])
{
    
ShowPlayerDialog(playeridDIALOG_DRINKDIALOG_STYLE_LIST,"[BAR] Odaberite piće","Sok od naranče (3$)\nCoca Cola (10$)\nPivo (20$)\nViski (45$)","Odaberi","Izlaz");
    return 
1;

Errors:

PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : error 029invalid expressionassumed zero
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : error 001expected token";"but found ")"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : error 029invalid expressionassumed zero
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Line 201:

PHP код:
    ShowPlayerDialog(playeridDIALOG_DRINKDIALOG_STYLE_LIST,"[BAR] Odaberite piće","Sok od naranče (3$)\nCoca Cola (10$)\nPivo (20$)\nViski (45$)","Odaberi","Izlaz"); 
Dialog:

PHP код:
        case DIALOG_DRINK:
        {
            if(
response)
            {
            
                {
                switch(
listitem)//
                    
{
                        case 
0:
                        {
                            if(
GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid0xFFFFFF"{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
                            
GivePlayerMoney(playerid, -3);
                            
SendClientMessage(playeridBijela,"{00C0FF}WG:{FFFFFF} Kupili ste sok od naranče{FFF1AF} (3$)");
                            
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
                        }
                        case 
1
                        {
                               if(
GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid0xFFFFFF"{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
                            
GivePlayerMoney(playerid, -10);
                            
SendClientMessage(playeridBijela,"{00C0FF}WG:{FFFFFF} Kupili ste Coca Colu{FFF1AF} (10$)");
                            
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
                           }
                        case 
2
                           {
                            if(
GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid0xFFFFFF"{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
                            
GivePlayerMoney(playerid, -20);
                            
SendClientMessage(playeridBijela,"{00C0FF}WG:{FFFFFF} Kupili ste Pivo{FFF1AF} (20$)");
                            
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_BEER);
                        }
                         case 
3:
                           {
                            if(
GetPlayerMoney(playerid) < 45) return SendClientMessage(playerid0xFFFFFF"{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
                            
GivePlayerMoney(playerid, -45);
                            
SendClientMessage(playeridBijela,"{00C0FF}WG:{FFFFFF} Kupili ste Viski{FFF1AF} (45$)");
                            
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_WINE);
                        }
                    
                }
            }
            
       }
       return 
1;

you ignored the Title message:
Quote:

CMD:drink(playerid,params[])
{
ShowPlayerDialog(playerid, DIALOG_DRINK, DIALOG_STYLE_LIST,"Here the title message(example: drinks)","[BAR] Odaberite piće","Sok od naranče (3$)\nCoca Cola (10$)\nPivo (20$)\nViski (45$)","Odaberi","Izlaz");
return 1;
}

Reply
#4

No i didn't. Don't you see "[BAR] Odaberite piće"?
Reply
#5

Код HTML:
CMD:drink(playerid,params[]) 
{
    #pragma unused params
    ShowPlayerDialog(playerid, DIALOG_DRINK, DIALOG_STYLE_LIST,"[BAR] Odaberite piće","Sok od naranče (3$)\nCoca Cola (10$)\nPivo (20$)\nViski (45$)","Odaberi","Izlaz"); 
    return 1; 
}
?


EDIT : Or #define DIALOG_DRINK , i don't see that in your description.
Reply
#6

Same errors?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)