Jump to content
  • 0

Erori


gabydemocray

Question

[pawn]  public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

{

if (newkeys==KEY_FIRE)

{

if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)

{

if(PlayerToPoint(10,playerid,1541.25183105, -1627.63208008, 15.15620422))

{

GetPlayerName(playerid, sendername, sizeof(sendername));

MoveObject(BPD,1540.4265,-1628.7733,24.3866,5.0);

SetTimerEx("BPDclose",5000,false,"d",playerid);

format(string, sizeof(string), "* %s takes out a remote control and opens the gate *", sendername);

ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

}

}

}

return 1;

}[/pawn]

De la comanda asta primesc erorile astea :

F:\Gaby\Jocuri\xvcc\Replay\gamemodes\saints.pwn(23802) : error 029: invalid expression, assumed zero
F:\Gaby\Jocuri\xvcc\Replay\gamemodes\saints.pwn(23802) : error 017: undefined symbol "newkeys"
F:\Gaby\Jocuri\xvcc\Replay\gamemodes\saints.pwn(23804) : error 017: undefined symbol "newkeys"
F:\Gaby\Jocuri\xvcc\Replay\gamemodes\saints.pwn(23821) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Uite incearca asa:

  public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if ( newkeys & KEY_FIRE )
	{
		if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
		{
			if(PlayerToPoint(10,playerid,1541.25183105, -1627.63208008, 15.15620422))
			{
				GetPlayerName(playerid, sendername, sizeof(sendername));
				MoveObject(BPD,1540.4265,-1628.7733,24.3866,5.0);
				SetTimerEx("BPDclose",5000,false,"d",playerid);
				format(string, sizeof(string), "* %s takes out a remote control and opens the gate *", sendername);
				ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
		}
	}
	return 1;
}
sau
 public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if ( newkeys == KEY_FIRE )
	{
		if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
		{
			if(PlayerToPoint(10,playerid,1541.25183105, -1627.63208008, 15.15620422))
			{
				GetPlayerName(playerid, sendername, sizeof(sendername));
				MoveObject(BPD,1540.4265,-1628.7733,24.3866,5.0);
				SetTimerEx("BPDclose",5000,false,"d",playerid);
				format(string, sizeof(string), "* %s takes out a remote control and opens the gate *", sendername);
				ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
		}
	}
	return 1;
}

http://wiki.sa-mp.com/wiki/OnPlayerKeyStateChange ;)

Fara reclama in semnatura!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.