Help with an error.
#1

When a player completes the mission in there private vehicle i want it so they get a 2k bouns. Couldn't really figure out how to fix the error.
pawn Код:
public OnPlayerFinishMission(playerid)
{
    //some other stuff here
}
    if(!strmatch(VehicleInfo[vehicleid][Owner],GetName(playerid)) && VehicleInfo[vehicleid][Ownable] == 1) (error line)
    {
        SendClientMessage(playerid, COLOR_GREEN,"Bouns for using private vehicle: $2000");
        GivePlayerMoney(playerid, 2000);
    }
}
pawn Код:
error.
C:\Documents and Settings\Hayden Bruin\Desktop\Pilot Heaven\gamemodes\pilot.pwn(620) : error 010: invalid function or declaration
Reply
#2

try to add;
return 1

I have no idea (:
Reply
#3

Quote:
Originally Posted by ollis93
Посмотреть сообщение
try to add;
return 1

I have no idea (:
Tryed that multiple times lol, thanks for trying anyways, thats all i ask.
Reply
#4

You end the function before the stuff your trying to add, just remove the first } and compile.
Reply
#5

Haha! He finally needs my help, easy as it is however...

pawn Код:
public OnPlayerFinishMission(playerid)
{
    if(!strmatch(VehicleInfo[vehicleid][Owner],GetName(playerid)) && VehicleInfo[vehicleid][Ownable] == 1) (error line)
    {
        SendClientMessage(playerid, COLOR_GREEN,"Bonus for using private vehicle: $2000");
        GivePlayerMoney(playerid, 2000);
    }
    // other stuff
    return 1;
}
Let me know how that works for ya.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)