SA-MP Forums Archive
Error Script - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error Script (/showthread.php?tid=162567)



Error Script - Brian_Furious - 23.07.2010

Hello guys, i have this error in my script:

pawn Код:
C:\Users\Administrator\Desktop\Legends Gaming RP\gamemodes\lgrp.pwn(215) : error 025: function heading differs from prototype
C:\Users\Administrator\Desktop\Legends Gaming RP\gamemodes\lgrp.pwn(11074) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
at line 215 i have
pawn Код:
forward OnPlayerUpdate(playerid, vehicleid, ispassenger);
and at line 11074 i have
pawn Код:
public OnPlayerUpdate(playerid, vehicleid, ispassenger)
Whats the problem?


Re: Error Script - Kieren - 23.07.2010

Best option is to rename the function as it already exists, it's fairly new to SA-MP.

https://sampwiki.blast.hk/wiki/OnPlayerUpdate


Re: Error Script - Яσскѕтая - 23.07.2010

OnPlayerUpdate is already in SA-MP
pawn Код:
public OnPlayerUpdate(playerid)
{
    return 1;
}
Try like
pawn Код:
forward OnPlayerVUpdate(playerid, vehicleid, ispassenger);

public OnPlayerVUpdate(playerid, vehicleid, ispassenger)



Re: Error Script - Brian_Furious - 23.07.2010

Quote:
Originally Posted by Яσскѕтая
Посмотреть сообщение
OnPlayerUpdate is already in SA-MP
pawn Код:
public OnPlayerUpdate(playerid)
{
    return 1;
}
Try like
pawn Код:
forward OnPlayerVUpdate(playerid, vehicleid, ispassenger);

public OnPlayerVUpdate(playerid, vehicleid, ispassenger)
Thanks!!!!!!!