02.03.2015, 15:54
(
Последний раз редактировалось NoDi522; 02.03.2015 в 16:50.
)
Hello. I have a problem with drink dialog.
Errors:
Line 201:
Dialog:
PHP код:
CMD:drink(playerid,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;
}
PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : error 029: invalid expression, assumed zero
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215: expression has no effect
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215: expression has no effect
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215: expression has no effect
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215: expression has no effect
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : warning 215: expression has no effect
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : error 001: expected token: ";", but found ")"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : error 029: invalid expression, assumed zero
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(201) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
PHP код:
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");
PHP код:
case DIALOG_DRINK:
{
if(response)
{
{
switch(listitem)//
{
case 0:
{
if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
GivePlayerMoney(playerid, -3);
SendClientMessage(playerid, Bijela,"{00C0FF}WG:{FFFFFF} Kupili ste sok od naranče{FFF1AF} (3$)");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
}
case 1:
{
if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, 0xFFFFFF, "{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
GivePlayerMoney(playerid, -10);
SendClientMessage(playerid, Bijela,"{00C0FF}WG:{FFFFFF} Kupili ste Coca Colu{FFF1AF} (10$)");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
}
case 2:
{
if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, 0xFFFFFF, "{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
GivePlayerMoney(playerid, -20);
SendClientMessage(playerid, Bijela,"{00C0FF}WG:{FFFFFF} Kupili ste Pivo{FFF1AF} (20$)");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
}
case 3:
{
if(GetPlayerMoney(playerid) < 45) return SendClientMessage(playerid, 0xFFFFFF, "{F81414}Greska:{FFFFFF} Nemate dovoljno novca na racunu.");
GivePlayerMoney(playerid, -45);
SendClientMessage(playerid, Bijela,"{00C0FF}WG:{FFFFFF} Kupili ste Viski{FFF1AF} (45$)");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
}
}
}
}
return 1;
}