#1

Hi i have this errors

Код:
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(3976) : warning 209: function "OnDialogResponse" should return a value
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(3977) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(3980) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(3983) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(3985) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(3990) : error 054: unmatched closing brace ("}")
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(3991) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(3993) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(3998) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(4000) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(4006) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(4008) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(4013) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(4015) : error 010: invalid function or declaration
C:\Users\NASTIE\Documents\Moje primljene datoteke\lva.pwn(4021) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
here are lines
Код:
  if(dialogid == 4 && response)
  {

     switch(listitem)
     {
      
      case 0:
      {
      if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy wine.");
      GivePlayerMoney(playerid, -50);
      SetPlayerSpecialAction(playerid,SPECIAL_ACTION_WINE);
      SendClientMessage(playerid,0x00FF0AFF,"You buy wine for 50$");

      }
      case 1:
      {
      if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy juice.");
      GivePlayerMoney(playerid, -25);
      SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK);
      SendClientMessage(playerid,0x00FF0AFF,"You buy juice for 25$");
      }
      case 2:
      {
      if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy lamb.");
      GivePlayerMoney(playerid, -500);
      SetPlayerHealth(playerid,100);
      ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
      SendClientMessage(playerid,0x00FF0AFF,"You buy lamb for 500$");
      }
      case 3:
      {
      if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy cigarettes.");
      GivePlayerMoney(playerid, -5);
      SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
      SendClientMessage(playerid,0x00FF0AFF,"You buy cigarettes for 5$");
      }
      case 4:
      {
      if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy beer.");
      GivePlayerMoney(playerid, -100);
      SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
      SendClientMessage(playerid,0x00FF0AFF,"You buy beer for 100$");
      }
   }
   return 1;
}
paste bin

can anyone fix me that please, tnx

Reply
#2

Fixed: Click Here
Reply
#3

nope dont work, it will work to copy paste all but here it is alll ondialogrespone

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 2 && response)
  {

    switch(listitem)
    {
      case 0:
      {
      if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy that drug.");
      GivePlayerMoney(playerid, -10000);
      SetPlayerDrunkLevel(playerid,6000);
      SetPlayerHealth(playerid, 100);
      ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
      SendClientMessage(playerid,0x00FF0AFF,"You buy cocaine for 10,000$");
      }
      case 1:
      {
      if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy that drug.");
      GivePlayerMoney(playerid, -2500);
      SetPlayerDrunkLevel(playerid,3000);
      ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
      SendClientMessage(playerid,0x00FF0AFF,"You buy crack for 2,500$");
      }
      case 2:
      {
      if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy that drug.");
      GivePlayerMoney(playerid, -500);
      SetPlayerDrunkLevel(playerid,3000);
      ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
      SendClientMessage(playerid,0x00FF0AFF,"You buy marijuana for 500$");
      }
    }
  }
  if(dialogid == 3)
      {
      if(response)
      {
      SendClientMessage(playerid,0x008000FF, "Welcome on server, enjoy");
      }
      else
      {
      SendClientMessage(playerid, 0xFF0000FF, "In that case this server is not for you.");
      new
      string[128],
      name[MAX_PLAYER_NAME];
      GetPlayerName(playerid,name,MAX_PLAYER_NAME);
      format(string,sizeof string,"%s Is kicked from server, he dont wanna respect rules.",name);
      SendClientMessageToAll(0xFF002DFF,string);
      Kick(playerid);
      }
    }

  }
  if(dialogid == 4 && response)
	{
		switch(listitem)
		{
	 		case 0:
	  		{
			   if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy wine.");
			   GivePlayerMoney(playerid, -50);
			   SetPlayerSpecialAction(playerid,SPECIAL_ACTION_WINE);
			   SendClientMessage(playerid,0x00FF0AFF,"You buy wine for 50$");
	   		}
	   		case 1:
	   		{
			   if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy juice.");
			   GivePlayerMoney(playerid, -25);
			   SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK);
			   SendClientMessage(playerid,0x00FF0AFF,"You buy juice for 25$");
	   		}
	   		case 2:
	   		{
			   if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy lamb.");
			   GivePlayerMoney(playerid, -500);
			   SetPlayerHealth(playerid,100);
			   ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
			   SendClientMessage(playerid,0x00FF0AFF,"You buy lamb for 500$");
	   		}
	   		case 3:
	   		{
			   if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy cigarettes.");
			   GivePlayerMoney(playerid, -5);
			   SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
			   SendClientMessage(playerid,0x00FF0AFF,"You buy cigarettes for 5$");
	   		}
	   		case 4:
	   		{
			   if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy beer.");
			   GivePlayerMoney(playerid, -100);
			   SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
			   SendClientMessage(playerid,0x00FF0AFF,"You buy beer for 100$");
			}
		}
		return 1;
	}
	return 0;
}
Reply
#4

FIXED MODERATOR CAN REMOVE THIS TOPIC
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)