Help with an error. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with an error. (
/showthread.php?tid=198766)
Help with an error. -
Haydz - 13.12.2010
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
Re: Help with an error. -
ollis93 - 13.12.2010
try to add;
return 1
I have no idea (:
Re: Help with an error. -
Haydz - 13.12.2010
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.
Re: Help with an error. -
Think - 13.12.2010
You end the function before the stuff your trying to add, just remove the first } and compile.
Re: Help with an error. -
SuperS82 - 13.12.2010
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.