SA-MP Forums Archive
function heading differs from prototype - 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: function heading differs from prototype (/showthread.php?tid=608816)



function heading differs from prototype - Izaki - 05.06.2016

nex-ac.inc(5276) : error 025:
please help me

Код HTML:
#else
	public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
#endif
{



http://imgur.com/Z7rnOBw

please help me
+rep


Re: function heading differs from prototype +rep - Unte99 - 05.06.2016

What server version are you using?


Re: function heading differs from prototype +rep - Izaki - 05.06.2016

v1.8

i using server 0.3.7 R2


Re: function heading differs from prototype +rep - SecretBoss - 05.06.2016

Try this code

Код:
#if defined OnPlayerSelectDynamicObject
	#if defined _inc_y_hooks || defined _INC_y_hooks
		Hook:ac_OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
	#else
		public OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
	#endif
	{
		if(AntiCheatInfo[playerid][acKicked]) return 0;
		new ac_i = GetTickCount();
		if(AntiCheatInfo[playerid][acACAllow][49])
		{
			if(ac_i < AntiCheatInfo[playerid][acCall][26] + ac_Mtfc[26][0]) ac_FloodDetect(playerid, 26);
			else if(ac_i < AntiCheatInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
			else AntiCheatInfo[playerid][acFloodCount][26] = AntiCheatInfo[playerid][acFloodCount][27] = 0;
		}
		AntiCheatInfo[playerid][acCall][27] = AntiCheatInfo[playerid][acCall][26] = ac_i;
		#if !defined _inc_y_hooks && !defined _INC_y_hooks\
			&& defined ac_OnPlayerSelectDynamicObject
			return ac_OnPlayerSelectDynamicObject(playerid, objectid, modelid, x, y, z);
		#else
			return 1;
		#endif
	}

	#if !defined _inc_y_hooks && !defined _INC_y_hooks
		#if defined _ALS_OnPlayerSelectDynamicObjec\
			|| defined _ALS_OnPlayerSelectDynamicObj || defined _ALS_OnPlayer\
			SelectDynamicObject
			#undef OnPlayerSelectDynamicObject
		#else
			#define _ALS_OnPlayerSelectDynamicObject
		#endif
		#define OnPlayerSelectDynamicObject ac_OnPlayerSelectDynamicObject
		#if defined ac_OnPlayerSelectDynamicObject
			forward ac_OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z);
		#endif
	#endif
#else
	#if defined _inc_y_hooks || defined _INC_y_hooks
		Hook:ac_OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
	#else
		public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
	#endif
	{
		if(AntiCheatInfo[playerid][acKicked]) return 0;
		new ac_i = GetTickCount();
		if(AntiCheatInfo[playerid][acACAllow][49])
		{
			if(ac_i < AntiCheatInfo[playerid][acCall][26] + ac_Mtfc[26][0]) ac_FloodDetect(playerid, 26);
			else if(ac_i < AntiCheatInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
			else AntiCheatInfo[playerid][acFloodCount][26] = AntiCheatInfo[playerid][acFloodCount][27] = 0;
		}
		AntiCheatInfo[playerid][acCall][27] = AntiCheatInfo[playerid][acCall][26] = ac_i;
		#if !defined _inc_y_hooks && !defined _INC_y_hooks\
			&& defined ac_OnPlayerSelectObject
			return ac_OnPlayerSelectObject(playerid, type, objectid, modelid, fX, fY, fZ);
		#else
			return 1;
		#endif
	}

	#if !defined _inc_y_hooks && !defined _INC_y_hooks
		#if defined _ALS_OnPlayerSelectObject
			#undef OnPlayerSelectObject
		#else
			#define _ALS_OnPlayerSelectObject
		#endif
		#define OnPlayerSelectObject ac_OnPlayerSelectObject
		#if defined ac_OnPlayerSelectObject
			forward ac_OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ);
		#endif
	#endif
#endif



Re: function heading differs from prototype +rep - Konstantinos - 05.06.2016

Quote:
Originally Posted by Izaki
Посмотреть сообщение
i using server 0.3.7 R2
You may be using 0.3.7 R2 version of the server but your includes indicate that are not updated. The velocity parameters where added in 0.3z R4. Update the includes came with the server package.


Re: function heading differs from prototype - Izaki - 05.06.2016

I shall continue to use version of how ?


Re: function heading differs from prototype - Izaki - 05.06.2016

code error

public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)