Drink Dialog
#1

i made a drink dialog but i dot get it why i get 26 errors..isnt the cmd good?

PHP код:
if ( dialogid == Dialog_Bar )
                    {
                    if ( 
response )
                    {
                    if( 
listitem == )
                    {
                    if(
PlayerInfo[playerid][pAge] < 16)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Barman:Scuzati trebuie sa detineti varsta de 16 ani!");
                    return 
1;
                    }
                    
GivePlayerCash(playerid, - 10);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_BEER);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 10SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 10.0); }
                    }
                    }
                    if( 
listitem == )
                    {
                    if(
PlayerInfo[playerid][pAge] < 18)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Barman:Scuzati trebuie sa detineti varsta de 18 ani!");
                    return 
1;
                    }
                    
GivePlayerCash(playerid, - 8);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_BEER);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 15SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 15.0); }
                    }
                    }
                    if( 
listitem == )
                    {
                    if(
PlayerInfo[playerid][pAge] < 18)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Barman:Scuzati trebuie sa detineti varsta de 18 ani!");
                    return 
1;
                    }
                    
GivePlayerCash(playerid, - 100);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_WINE);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 20SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 20.0); }
                    }
                    }
                    if( 
listitem == )
                    {
                    if(
PlayerInfo[playerid][pAge] < 18)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Barman:Scuzati trebuie sa detineti varsta de 18 ani!");
                    return 
1;
                    }
                    
GivePlayerCash(playerid, - 20);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_WINE);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 27SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 27.0); }
                    }
                    }
                    if( 
listitem == )
                    {
                    if(
PlayerInfo[playerid][pAge] < 18)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Barman:Scuzati trebuie sa detineti varsta de 18 ani!");
                    return 
1;
                    }
                    
GivePlayerCash(playerid, - 18);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_WINE);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 40SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 40.0); }
                    }
                    }
                    if(
listitem== )
                    {
                    
GivePlayerCash(playerid, - 10);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
                    
SetPlayerDrunkLevel(playerid, -1000);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 5SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 50.0); }
                    }
                    else if(
health 100)
                    {
                    
SetPlayerHealth(playerid100);
                    }
                    }
                    if(
listitem == )
                    {
                    
GivePlayerCash(playerid, - 4);
                    new 
Float:health;
                    
GetPlayerHealth(playeridhealth);
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_DRINK_SPRUNK);
                    
SetPlayerDrunkLevel(playerid, -1000);
                    if(
health 100)
                    {
                    if(
PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp PlayerInfo[playerid][pAlcoholPerk]; hp += 5SetPlayerHealth(playeridhealth hp); }
                    else { 
SetPlayerHealth(playeridhealth 50.0); }
                    }
                    else if(
health 100)
                    {
                    
SetPlayerHealth(playerid100);
                    }
                    }
                    return 
1;
                    } 
PHP код:
if(strcmp(cmd"/drink"true) == 0)
                    {
                    if(
IsAtBar(playerid))
                    {
                    if(
GetPlayerDrunkLevel(playerid) <= 20000)
                    {
                    
ShowPlayerDialog(playerid,Dialog_Bar,DIALOG_STYLE_LIST,"{278227}Bar","Apa\nFanta\nBere\nTuica\nSampanie\nVodka\nLichior","Selecteaza","Inchide");
                    return 
1;
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Bartender: I don't know that Drink Name.");
                    return 
1;
                    }
                    
format(stringsizeof(string), "* %s bea %s de la pahar."sendername,Dialog_Bar);
                    
ProxDetector(30.0playeridstringCOLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
                    }
                    else
                    {
                    
SendClientMessage(playeridCOLOR_GREY"   Numai poti sa bei");
                    return 
1;
                    }
                    }
                    }
                    } 
Reply
#2

What are the goddamn ERRORS?
Reply
#3

the 26 errors have nothing in common with the command..
Reply
#4

i guess no one knows..
Reply
#5

List the errors and the lines that the errors occur on.
Reply
#6

Show us the errors,

ARe they like "UNDEFINED BALBLA"?

If so, your missing a bracket.
Reply
#7

Then why you mentioned of the 26 errors if you are feeling shy to paste the errors here?
Reply
#8

Quote:
Originally Posted by milanosie
Посмотреть сообщение
Show us the errors,

ARe they like "UNDEFINED BALBLA"?

If so, your missing a bracket.
yes i dont know where im missing braket..
Reply
#9

Quote:
Originally Posted by Dan_Barocu
Посмотреть сообщение
yes i dont know where im missing braket..
Well, break down your code step by step,
Just watch carefully.

Cant help you with that problem as its your code, with your bracket:_)
Reply
#10

Quote:
Originally Posted by Dan_Barocu
Посмотреть сообщение
yes i dont know where im missing braket..
How about you read about what people are telling you. Post the errors and the exact lines they occur on!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)