06.12.2010, 19:47
Error is marked with //blabla
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
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:
{
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:
{
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; //...Dialog.pwn(43) : warning 217: loose indentation *This is line 43*
}