PAWN Issue
#1

I'm not sure where to post about PAWN crashes so I appologize in advance. Basically my issue is that ever since I added the OnPlayerKeyStateChange callback to my script the compiler crashes. Maybe I'm too tired to notice my errors but here's the code that's doing it:
Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys);
{
	if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_BEER || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_WINE)
	{
	  new msg[25];
    if ((oldkeys & KEY_FIRE) && !(newkeys & KEY_FIRE))
		{
		  new drunklvl = GetPlayerDrunkLevel(playerid);
			format(msg,sizeof(msg),"Drunk: %d",drunklvl);
			SendClientMessage(playerid,COLOR_YELLOW,msg);
		}
	}
	return 1;
}
Formating is horrible and I suck at using forums, sorry about that.
Reply
#2

public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)[;] - Remove this
Reply
#3

Quote:
Originally Posted by cyber_punk
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)[;] - Remove this
Thanks, it was too late at night to be scripting.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)