SA-MP Forums Archive
please solve this error 001 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: please solve this error 001 (/showthread.php?tid=648959)



please solve this error 001 - Dirda - 31.01.2018

I was trying to make someone can't get in the vehicle when he/she injured (for RP server)
and i found this error.
please fix this.

Код:
	if(IsKeyJustDown(KEY_SECONDARY_ATTACK, newkeys, oldkeys))
	{
	    if(GetPVarInt(playerid, "NGPassenger") == 1)
	    {
	        TogglePlayerSpectating(playerid, 0);
		}
		if(GetPVarInt(playerid, "UsingSprunk"))
		{
			DeletePVar(playerid, "UsingSprunk");
			SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
			}
		if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT || GetPVarInt(playerid, "Injured" == 1) // line 20111
		{
			ApplyAnimation(playerid, "ped", "KO_skid_front", 4.0, 0, 1, 1, 1, 0, 1);
			return 1;
		}
	}
Код:
AGRP.TMP(20111) : error 001: expected token: "-string end-", but found "-identifier-"
*Note: I am using PawnoX to script.


Re: please solve this error 001 - saffierr - 31.01.2018

PHP код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT || GetPVarInt(playerid"Injured") == 1



Re: please solve this error 001 - Dirda - 31.01.2018

Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT || GetPVarInt(playerid, "Injured") == 1)
Oh no need. i forgot to put ")" after "Injured"
it should be
Код:
GetPVarInt(playerid, "Injured") == 1)
not
Код:
GetPVarInt(playerid, "Injured" == 1)



Re: please solve this error 001 - Sew_Sumi - 31.01.2018

Quote:
Originally Posted by Dirda
Посмотреть сообщение
*Note: I am using PawnoX to script.
Quote:

Date Added: 14.5.2006

That's pretty old, just saying.

Stick with Pawno, and simply use run as admin to get it to work properly. Or look at some of the other options on the forums here.