SA-MP Forums Archive
y_hooks error when compiling gamemode - 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: y_hooks error when compiling gamemode (/showthread.php?tid=556209)



y_hooks error when compiling gamemode - Ejected - 10.01.2015

Код:
C:\Users\Mario\Desktop\Knoxx SAMP Server\Clark County Roleplay\pawno\include\YSI\y_hooks/impl.inc(1755) : error 025: function heading differs from prototype
C:\Users\Mario\Desktop\Knoxx SAMP Server\Clark County Roleplay\pawno\include\YSI\y_hooks/impl.inc(2339) : error 025: function heading differs from prototype
C:\Users\Mario\Desktop\Knoxx SAMP Server\Clark County Roleplay\pawno\include\YSI\y_hooks/impl.inc(2386) : error 025: function heading differs from prototype



Re: y_hooks error when compiling gamemode - Primard - 10.01.2015

https://sampforum.blast.hk/showthread.php?tid=488198 this thread is a solution to the error


Re: y_hooks error when compiling gamemode - Ejected - 10.01.2015

Код:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z) //line 1755
{
	P:2("Hooks_OnUnoccupiedVehicleUpdate called: %d, %d, %d, %f, %f, %f", vehicleid, playerid, passenger_seat, new_x, new_y, new_z);
	new
		end   = _:YSI_g_sCallbackEnd[ALS_OnUnoccupiedVehicleUpdate],
		start = _:YSI_g_sCallbackStart[ALS_OnUnoccupiedVehicleUpdate],
		ret = ALS_R_UnoccupiedVehicleUpdate;
	while (start++ != end)
	{
		#emit PUSH.S new_z
		#emit PUSH.S new_y
		#emit PUSH.S new_x
		#emit PUSH.S passenger_seat
		#emit PUSH.S playerid
		#emit PUSH.S vehicleid
		// I wonder if I could hack the stack with a negative number so that when
		// the called function returns it puts all the header data BACK on to the
		// stack instead of removing the parameters and header.
		#emit PUSH.C     24
		#emit CONST.alt  YSI_g_sCallbackAddresses
		#emit LOAD.S.pri start
		//#emit INC.pri
		//#emit STOR.S.pri start
		#emit LIDX
		#emit MOVE.alt
		#emit LCTRL      6
		#emit ADD.C      24
		#emit PUSH.pri
		#emit MOVE.pri
		#emit SCTRL      6
		#emit MOVE.alt
		#emit CONST.pri  0xFFFFFFFE
		#emit AND
		#emit PUSH.pri
		#emit LOAD.S.pri ret
		#emit AND
		#emit POP.alt
		#emit OR
		#emit STOR.S.pri ret
		if (ret < 0) return ret + 1;
	}
	return ret;
}



Re: y_hooks error when compiling gamemode - Ejected - 10.01.2015

Quote:
Originally Posted by Primard
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=488198 this thread is a solution to the error
I did this and I have everything already changed.

but I'm getting this when I try to compile it

Код:
Current directory: C:\Users\Mario\Desktop\Knoxx SAMP Server\Clark County Roleplay\pawno\include\YSI\y_hooks
impl.inc(70) : fatal error 100: cannot read from file: "internal\y_version"

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


1 Error.
================ READY ================



Re: y_hooks error when compiling gamemode - Primard - 10.01.2015

You need the ysi plugin