error 010: invalid function or declaration - 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)
+--- Thread: error 010: invalid function or declaration (
/showthread.php?tid=562292)
error 010: invalid function or declaration -
LuisPark - 08.02.2015
PHP код:
error 010: invalid function or declaration
code
PHP код:
CMD:laybanhraxe(playerid, params[])
{
new closestcar = GetClosestCar(playerid);
if(IsPlayerInRangeOfVehicle(playerid, closestcar, 10.0))
{
if(!IsABike(closestcar))
{
SendClientMessageEx(playerid,COLOR_GREY," Ban khong gan mot chiec xe nao do !");
}
if(PlayerInfo[playerid][pFallIntoFun] == 0)
{
SendClientMessageEx(playerid,COLOR_GREY," Ban khong co banh pizza da~ duoc dat vao xe !");
}
if(PlayerInfo[playerid][pFallIntoFun] > 0)
{
SetPlayerAttachedObject( playerid, 0, 1582, 1, -0.064613, 0.520760, 0.000000, 0.000000, 84.217391, 0.000000, 1.000000, 1.000000, 1.000000 );
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 1, 1, 1, 1, 1);
PlayerInfo[playerid][pHunger] = 1;
SendClientMessageEx(playerid,COLOR_RED," Ban da lay banh ra khoi xe");
}
}
}
return 1; //line 57032(got error from herE)
}
Re: error 010: invalid function or declaration -
SnG.Scot_MisCuDI - 08.02.2015
You had an extra bracket.
pawn Код:
CMD:laybanhraxe(playerid, params[])
{
new closestcar = GetClosestCar(playerid);
if(IsPlayerInRangeOfVehicle(playerid, closestcar, 10.0))
{
if(!IsABike(closestcar))
{
SendClientMessageEx(playerid,COLOR_GREY," Ban khong gan mot chiec xe nao do !");
}
if(PlayerInfo[playerid][pFallIntoFun] == 0)
{
SendClientMessageEx(playerid,COLOR_GREY," Ban khong co banh pizza da~ duoc dat vao xe !");
}
if(PlayerInfo[playerid][pFallIntoFun] > 0)
{
SetPlayerAttachedObject( playerid, 0, 1582, 1, -0.064613, 0.520760, 0.000000, 0.000000, 84.217391, 0.000000, 1.000000, 1.000000, 1.000000 );
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 1, 1, 1, 1, 1);
PlayerInfo[playerid][pHunger] = 1;
SendClientMessageEx(playerid,COLOR_RED," Ban da lay banh ra khoi xe");
}
}
return 1; //line 57032(got error from herE)
}