[Help] YSI\y_hooks error [[+REP]]
#1

Hi! So i'm personalizing my Server GM ((v0.3.7)) and the Pawno Compiler get me this error:

C:\Users\MLG_OPBoT\Desktop\GTA San Andreas\SERVER\pawno\include\YSI\y_hooks/impl.inc(2336) : error 025: function heading differs from prototype
C:\Users\MLG_OPBoT\Desktop\GTA San Andreas\SERVER\pawno\include\YSI\y_hooks/impl.inc(2383) : error 025: function heading differs from prototype


The lines are 2336:

Код:
foreach(Player, i)
			{
			    if(IsACop(i))
			    {
					new Saved = (TotalRobbers*50000-(TotalStolen*50000));
					GiveZaiatMoney(i, Saved/copsonline);
					format(string, sizeof(string), "** You have received your cut from the saved money. ($%d)", Saved/copsonline);
					SendClientMessage(i, COLOR_LIME, string);
			    }
			}
		}
    }
	// 3D Text
	/*Delete3DTextLabel(AltTabText[playerid]);
	Delete3DTextLabel(AFKText[playerid]);
	Delete3DTextLabel(aDutyText[playerid]);
	Delete3DTextLabel(VIPText[playerid]);*/
	if(IsValidDynamic3DTextLabel(AltTabText[playerid])) DestroyDynamic3DTextLabel(AltTabText[playerid]);
	if(IsValidDynamic3DTextLabel(AFKText[playerid]))DestroyDynamic3DTextLabel(AFKText[playerid]);
	if(IsValidDynamic3DTextLabel(aDutyText[playerid]))DestroyDynamic3DTextLabel(aDutyText[playerid]);
	if(IsValidDynamic3DTextLabel(hDutyText[playerid]))DestroyDynamic3DTextLabel(hDutyText[playerid]);
	if(IsValidDynamic3DTextLabel(VIPText[playerid]))DestroyDynamic3DTextLabel(VIPText[playerid]);
	if(IsValidDynamic3DTextLabel(MaskText[playerid]))DestroyDynamic3DTextLabel(MaskText[playerid]); // Masklabel
	// Timers
And 2383:

Код:
// Contract
	format(PlayerInfo[playerid][pContractBy], 32, "");
	format(PlayerInfo[playerid][pContractDetail], 64, "");
	// Warns
	format(PlayerInfo[playerid][pWarn1], 64, "");
	format(PlayerInfo[playerid][pWarn2], 64, "");
	format(PlayerInfo[playerid][pWarn3], 64, "");
	format(PlayerInfo[playerid][pWarn4], 64, "");
	format(PlayerInfo[playerid][pWarn5], 64, "");
	// Spam
	format(OldSpamCommand[playerid], 128, "");
	format(NewSpamCommand[playerid], 128, "");
	format(OldSpamChat[playerid], 128, "");
	format(NewSpamChat[playerid], 128, "");
	// Flag
	format(PlayerInfo[playerid][pFlag], 64, "");
	// Accent
	format(PlayerInfo[playerid][pAccent], 16, "");
	// VIP Name
I really dont know if the error starts from the code or the "include file: y_hook/impl.inc"
PLS anyone can help me?
Reply
#2

https://sampforum.blast.hk/showthread.php?pid=2879597#pid2879597
Reply
#3

The post Didn't help me :v
Reply
#4

The problem is most likely your SA-MP version vs YSI version. So tell us what version of each of those you have.
Reply
#5

My Samp version is 0.3.7 (i specified that in the post, but no problem ) and the entire script is optimized for 0.3.7 and i "think" i have the latest version of YSI from here: http://sendupload.cba.pl/getfile.php?id=225
Reply
#6

Well, im an idiot i didnt read the entire message and the code from my post is wrong
Reply
#7

Quote:

i "think" i have the latest version of YSI

No you have an old YSI (elder version of 3, which is not compatible with 0.3z and up because of OPTD and OPGD). Download YSI 4.0.
Reply
#8

First line is the 2336 error:


public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
P:2("Hooks_OnPlayerTakeDamage called: %d, %d, %f, %d, %d", playerid, issuerid, Float:amount, weaponid, bodypart);
new
end = _:YSI_g_sCallbackEnd[ALS_OnPlayerTakeDamage],
start = _:YSI_g_sCallbackStart[ALS_OnPlayerTakeDamage],
ret = ALS_R_PlayerTakeDamage;
while (start++ != end)
{
#emit PUSH.S bodypart
#emit PUSH.S weaponid
#emit PUSH.S amount
#emit PUSH.S issuerid
#emit PUSH.S playerid
#emit PUSH.C 16
#emit CONST.alt YSI_g_sCallbackAddresses
#emit LOAD.S.pri start
//#emit INC.pri
//#emit STOR.S.pri start
Reply
#9

"bodypart" parameter does exist in the file you linked above so it was the updated version of it to fix those two errors. If you are sure that a_samp.inc is updated to 0.3.7 and the forwards are like this:
pawn Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart);
forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart);
you better look at other includes that use those two callbacks.

Though, you should consider to YSI 4.0 as Crayder already suggested.
Reply
#10

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Though, you should consider to YSI 4.0 as Crayder already suggested.
Or at the least a fixed version of 3.1, but 4.0 is being updated and maintained by Misuir (and Y-Less, still) so you should go with that.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)