Truckingmissions.inc Error.
#1

Hey guys.

I was editing Truckingmissions.inc, to add score when a player finishes a mission, but i keep getting an error.
Any help would be appreciated.

The Code:
Код:
forward Loading(playerid);
public Loading(playerid)
{
    minfo[playerid][CheckpointID] = 2;
	TogglePlayerControllable(playerid, 1);
	#if defined USE_RACE_CHECKPOINT
	    DisablePlayerRaceCheckpoint(playerid);
        minfo[playerid][Checkpoint] = SetPlayerRaceCheckpoint(playerid, RACE_CHECKPOINT_TYPE, minfo[playerid][Lastx], minfo[playerid][Lasty], minfo[playerid][Lastz], minfo[playerid][Lastx], minfo[playerid][Lasty], minfo[playerid][Lastz], CHECKPOINT_SIZE);
	#else
	    DisablePlayerCheckpoint(playerid);
        minfo[playerid][Checkpoint] = SetPlayerCheckpoint(playerid, minfo[playerid][Lastx], minfo[playerid][Lasty], minfo[playerid][Lastz], CHECKPOINT_SIZE);
	#endif
    return 1;
}

forward UnLoading(playerid);
public UnLoading(playerid)
{
    minfo[playerid][CheckpointID] = 0;
	TogglePlayerControllable(playerid, 1);
	format(s, sizeof(s), "You have earned: $%d", minfo[playerid][Pay]);
	SendClientMessage(playerid, 0x33CCFFAA, s);
	GivePlayerMoney(playerid, minfo[playerid][Pay]);
    OnPlayerFinishMission(playerid);
    SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
	#if defined USE_RACE_CHECKPOINT
	    DisablePlayerRaceCheckpoint(playerid);
	#else
	    DisablePlayerCheckpoint(playerid);
	#endif
    return 1;
}
The Errors:
Код:
C:\Users\WickeD\Desktop\Alpine Trucking\pawno\include\TruckingMissions.inc(243) : error 004: function "OnPlayerFinishMission" is not implemented
Thanks
Excelize
Reply
#2

simple, as far as the code uve posted is concerned.
you havent made a function called onplayerfinishmission.
the error clearly states that.
cheers
Reply
#3

Yeah, sorry about this, it was 3a.m. and I was up for 29 hours xD Fixed now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)