error 025: function heading differs from prototype
#1

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;
}
Reply
#2

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(playeridCOLOR_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(playeridmrand);
        }
    }
    return 
1;

To start this function you can use this where the code should be activated:
PHP код:
PlayerRobStore(playerid); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)