YSI 4.0 problem
#1

Hello. I have just updated to YSI 4.0 and I am having this small problem. When I try to compile my script, I get these error messages:
Код:
D:\SAMP scripts\FuseGaming Roleplay\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(227) : error 025: function heading differs from prototype
D:\SAMP scripts\FuseGaming Roleplay\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(228) : error 025: function heading differs from prototype
D:\SAMP scripts\FuseGaming Roleplay\gamemodes\FGRP.pwn(5831) : error 025: function heading differs from prototype
D:\SAMP scripts\FuseGaming Roleplay\gamemodes\FGRP.pwn(5844) : error 025: function heading differs from prototype
And the lines 5831 and 5844 are:
Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
I fixed that problem by changing in impl.inc:
Код:
forward e_COMMAND_ERRORS:OnPlayerCommandReceived(playerid, cmdtext[], e_COMMAND_ERRORS:success); 
forward e_COMMAND_ERRORS:OnPlayerCommandPerformed(playerid, cmdtext[], e_COMMAND_ERRORS:success);
To
Код:
forward OnPlayerCommandReceived(playerid, cmdtext[], success); 
forward OnPlayerCommandPerformed(playerid, cmdtext[], success);
But I don't think these callbacks are being called anymore. I hope you can help me.
Reply
#2

Quote:
Originally Posted by mirou123
Посмотреть сообщение
Hello. I have just updated to YSI 4.0 and I am having this small problem. When I try to compile my script, I get these error messages:
Код:
D:\SAMP scripts\FuseGaming Roleplay\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(227) : error 025: function heading differs from prototype
D:\SAMP scripts\FuseGaming Roleplay\pawno\include\YSI\..\YSI_Visual\y_commands/impl.inc(228) : error 025: function heading differs from prototype
D:\SAMP scripts\FuseGaming Roleplay\gamemodes\FGRP.pwn(5831) : error 025: function heading differs from prototype
D:\SAMP scripts\FuseGaming Roleplay\gamemodes\FGRP.pwn(5844) : error 025: function heading differs from prototype
And the lines 5831 and 5844 are:
Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
I fixed that problem by changing in impl.inc:
Код:
forward e_COMMAND_ERRORS:OnPlayerCommandReceived(playerid, cmdtext[], e_COMMAND_ERRORS:success); 
forward e_COMMAND_ERRORS:OnPlayerCommandPerformed(playerid, cmdtext[], e_COMMAND_ERRORS:success);
To
Код:
forward OnPlayerCommandReceived(playerid, cmdtext[], success); 
forward OnPlayerCommandPerformed(playerid, cmdtext[], success);
But I don't think these callbacks are being called anymore. I hope you can help me.
The error was in your script, not YSI. You should not have changed the YSI script.
Reply
#3

Well, I said I was having the problem before editing anything. And when I changed the lines I posted, my script actually compiled but those callbacks are not being called anymore.

EDIT: NVM I got it fixed. Thanks everyone.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)