error 025: 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: error 025: function heading differs from prototype (
/showthread.php?tid=625826)
error 025: function heading differs from prototype -
Thanks - 06.01.2017
help...
ERROR: error 025: function heading differs from prototype
Код:
if(checkpointid == CP_DragPoint)
{
if(ROBBING_Dragon[playerid] == 1)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
SendClientMessage(playerid, COLOR_ORANGE, "Robbery Completed");
ROBBING_Dragon[playerid] =0;
new mrand =random(150000);
format(string,sizeof(string),"[ROBBERY] {FAFBFA}%s(%d) has robbed a total of {FDB400}$%d {FAFBFA}from {PFDB400}Four Dragon Casino!",pName,playerid,mrand);
SendClientMessageToAll(COLOR_RED,string);
GivePlayerMoney(playerid, mrand);
}
}
return 1;
}
Re: error 025: function heading differs from prototype -
PeanutButter - 07.01.2017
Is this supposed to be a function? If it is then you missed the function header.
It should be something like this:
PHP код:
stock PlayerRobStore(playerid)
{
if(checkpointid == CP_DragPoint)
{
if(ROBBING_Dragon[playerid] == 1)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
SendClientMessage(playerid, COLOR_ORANGE, "Robbery Completed");
ROBBING_Dragon[playerid] =0;
new mrand =random(150000);
format(string,sizeof(string),"[ROBBERY] {FAFBFA}%s(%d) has robbed a total of {FDB400}$%d {FAFBFA}from {PFDB400}Four Dragon Casino!",pName,playerid,mrand);
SendClientMessageToAll(COLOR_RED,string);
GivePlayerMoney(playerid, mrand);
}
}
return 1;
}
To start this function you can use this where the code should be activated:
PHP код:
PlayerRobStore(playerid);