Having a problem getting this dialog to compile (Help please)
#1

Any help will be appreciated.

Script:

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
		if (dialogid == 1 && response)
	{
	    switch(listitem)
	    {
	        case 0:
			{
			    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pizza stack menu", "Burger and fries ($10)\nOne slice of pepperoni pizza($5)\nTwo slices of pepperoni pizza ($10)\nOne whole pepperoni pizza ($20)", "Buy", "Exit");
			}
		}
	}
		if (dialogid == 1 && response)
		{
	    switch(listitem)
	 	{
			case 0:
			{
			if(GetPlayerHealth(playerid) > 100) return SendClientMessage(playerid, 0xAA3333AA, "ERROR: You don't seem to be hungry (Your HP is full).");
			else if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, 0xAA3333AA, "Worker: You don't have enough money for burger and fries.");
			SetPlayerHealth(playerid, 50);
			GivePlayerMoney(playerid, -10);
			SendClientMessage(playerid, 0xFFFF00AA, "Worker: Enjoy your burger and fries!");
			}
			case 1:
			{
			if(GetPlayerHealth(playerid) > 100) return SendClientMessage(playerid, 0xAA3333AA, "ERROR: You don't seem to be hungry (Your HP is full).");
			else if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xAA3333AA, "Worker: You don't have enough money for a slice of pizza.");
			SetPlayerHealth(playerid, 25);
			GivePlayerMoney(playerid, -5);
			SendClientMessage(playerid, 0xFFFF00AA, "Worker: Enjoy your pizza!");
			}
			case 2:
			{
			if(GetPlayerHealth(playerid) > 100) return SendClientMessage(playerid, 0xAA3333AA, "ERROR: You don't seem to be hungry (Your HP is full).");
			else if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, 0xAA3333AA, "Worker: You don't have enough money for two slices of pizza.");
			SetPlayerHealth(playerid, 50);
			GivePlayerMoney(playerid, -10);
			SendClientMessage(playerid, 0xFFFF00AA, "Worker: Enjoy your pizza!");
			}
			case 3:
			{
			if(GetPlayerHealth(playerid) > 100) return SendClientMessage(playerid, 0xAA3333AA, "ERROR: You don't seem to be hungry (Your HP is full).");
			else if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, 0xAA3333AA, "Worker: You don't have enough money for a whole pizza.");
			SetPlayerHealth(playerid, 100);
			GivePlayerMoney(playerid, -20);
			SendClientMessage(playerid, 0xFFFF00AA, "Worker: Enjoy your pizza!");
			}
		}
	}
		return 1;
}
Warnings:

Код:
C:\Users\Lee\Desktop\SA-MP scripting\gamemodes\foodmenu.pwn(242) : warning 202: number of arguments does not match definition
C:\Users\Lee\Desktop\SA-MP scripting\gamemodes\foodmenu.pwn(250) : warning 202: number of arguments does not match definition
C:\Users\Lee\Desktop\SA-MP scripting\gamemodes\foodmenu.pwn(258) : warning 202: number of arguments does not match definition
C:\Users\Lee\Desktop\SA-MP scripting\gamemodes\foodmenu.pwn(266) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)