My script just died.
#1

Couple of people said to me; manipulate with your script, learn by yourself and so I did. Well. I got bunches of errors, if someone knows how to fix this I would be more than glad to give rep up.

Код:
CMD:fastfood(playerid, params[])
{
     new fastfood = SetPlayerCheckpoint(playerid, 2106.7183,1383.6013,10.3024,141.4535, 20)
     if(IsPlayerInCheckPoint(playerid, fastfood));
     {
	 ShowPlayerDialog(playerid, 20324, DIALOG_STYLE_LIST, "Fast-Food shop.", "Hamburger(100$)\nHotDog(150$)\nPie(200$)\nBigMomma Burger(500$)", "I'll take this one.", "No thanks.");
     }
     else
     {
     SendClientMessage(playerid, 0xAA3333AA, "You're not near Fast-Food stand!");
     }
     return 1;
}
Код:
On this script these errors are showing:
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(149) : warning 219: local variable "fastfood" shadows a variable at a preceding level
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(149) : warning 202: number of arguments does not match definition
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(150) : error 001: expected token: ";", but found "if"
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(150) : error 017: undefined symbol "IsPlayerInCheckPoint"
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(150) : error 036: empty statement
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial.pwn(150) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
If you need dialog that I was using about this:
Код:
			   ShowPlayerDialog(playerid, 20324, DIALOG_STYLE_LIST, "Fast-Food shop.", "Hamburger(100$)\nHotDog(150$)\nPie(200$)\nBigMomma Burger(500$)", "I'll take this one.", "No thanks.");
            }
        }
    }
    if (dialogid == 20326 && response)
    {
	   switch(listitem)
	   {
		  case 0:
		  {
		  if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0000, "Not enough money.");
		  GivePlayerMoney(playerid, -100);
		  AddPlayerHealth(playerid, 20);
		  SendClientMessage(playerid, 0x99FFFF, "You bought Hamburger.");
		  }
		  case 1:
		  {
		  if(GetPlayerMoney(playerid) < 150) return SendClientMessage(playerid, 0xFF0000, "Not enough money.");
	      GivePlayerMoney(playerid, -150);
		  AddPlayerHealth(playerid, 40);
		  SendClientMessage(playerid, 0x99FFFF, "You bought hotdog.");
		  }
		  case 2:
		  {
		  if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFF0000, "Not enough money.");
		  GivePlayerMoney(playerid, -200);
		  SetPlayerHealth(playerid, 75);
		  SendClientMessage(playerid, 0x99FFFF, "You bought pie.");
		  }
		  case 3:
		  {
		  if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0000, "Not enough money.");
		  GivePlayerMoney(playerid, -500);
		  SetPlayerHealth(playerid, 100);
		  SendClientMessage(playerid, 0x99FFFF, "You bought BigMomma Burger");
		  }
      }
   }

    return 1;
}
Reply


Messages In This Thread
My script just died. - by Bek_Loking - 19.06.2014, 13:29
Re: My script just died. - by Faisal_khan - 19.06.2014, 13:40
Re: My script just died. - by Konstantinos - 19.06.2014, 13:42
Re: My script just died. - by Bek_Loking - 19.06.2014, 13:51
Re: My script just died. - by Faisal_khan - 19.06.2014, 13:57
Re: My script just died. - by Konstantinos - 19.06.2014, 14:00
Re: My script just died. - by Bek_Loking - 19.06.2014, 14:02
Re: My script just died. - by Faisal_khan - 19.06.2014, 14:05
Re: My script just died. - by Konstantinos - 19.06.2014, 14:07
Re: My script just died. - by Bek_Loking - 19.06.2014, 14:30

Forum Jump:


Users browsing this thread: 1 Guest(s)