Public lacks function error
#1

PHP код:
public terminarMission2(playerid)
{
    new 
msg[255];
    
format(msg,sizeof(msg),"~r~Bus ~w~Job cancelled~n~ You carried ~r~%d~w~ pasengers.",contador2[playerid]);
    
GameTextForPlayer(playerid,msg,5000,6);
    
playerInMiniMission2[playerid]=-1;
    
currentcheckpoint[playerid] = 0;
    
DisablePlayerRaceCheckpoint(playerid);
    
avisado2[playerid]=-1;
       new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
       
format(msg,sizeof(msg),"***ATENTION: %s Is NOT a Bus DRIVER anymore***",name);
    
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    for(new 
i=0;i<MAX_PLAYERS;i++)
    {
        if(
playerid!=i)
        {
            
SendClientMessage(i,0xFFFF00AA,msg);
        }
    }
    for(new 
i=0;i<MAX_PLAYERS;i++)
    {
        if(
OnBusAsPassenger[i]==playerid)
        {
            new 
Bussta playerid;
            
OnBusAsPassenger[i]=-1;
            new 
viaje=CostoDelViaje2[i];
            
format(msg,sizeof(msg),"~w~You pay to ~g~%s ~n~~r~$%d~w~ for the ~r~Bus~w~ ride.",name,viaje);
            
GameTextForPlayer(i,msg,5000,6);
            
format(msg,sizeof(msg),"~w~You get ~r~$%d~w~ ~n~for the ~r~Bus~w~ ride.",viaje);
            
GameTextForPlayer(Bussta,msg,5000,6);
            
GivePlayerMoney(i,-viaje);
            
GivePlayerMoney(Bussta,viaje);
            
cantidadPasajeros2--;
            if(
cantidadPasajeros2==0)
            {
                
KillTimer(caidadeficha2Timer2);
            }
        }
    }
    
contador2[playerid]=0;
    return 
1;

What's wrong with it .

PHP код:
warning 235: public function lacks forward declaration (symbol "terminarMission2"
Line:

public terminarMission2(playerid)
Reply
#2

Add the first line of the below example directly above your function definition
Код:
forward terminarMission2(playerid);
public terminarMission2(playerid)
{
...
Reply
#3

Oh damn. I tho i added it already . Thanks
Reply
#4

My pleasure :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)