SA-MP Forums Archive
GetVehicleVelocity Problem - 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: GetVehicleVelocity Problem (/showthread.php?tid=316555)



GetVehicleVelocity Problem - cs_waller - 07.02.2012

Hello guys I have 2 errors from my code .Here is the code:


ERRORS
PHP код:
error 025: function heading differs from prototype
error 076
syntax error in the expression, or invalid function call 
pawn Код:
forward SpeedControl(vehicleid,playerid)
pawn Код:
public SpeedControl(vehicleid,playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 15, 1578.50, 389.46, 17.92))
    {
    if(GetVehicleVelocity < 60)
    GivePlayerMoney(playerid, 2500);
    SendClientMessage(playerid, COLOR_RED, "Òè êàðàøå ñ íàä 60 êèëîìåòðà è êàìåðàòà òå ôëàøíà è èìàø ãëîáà!");
    }
}



Re: GetVehicleVelocity Problem - Madd Kat - 07.02.2012

try changeing
pawn Код:
forward SpeedControl(vehicleid,playerid(
to

pawn Код:
forward SpeedControl(vehicleid,playerid)



Re: GetVehicleVelocity Problem - cs_waller - 07.02.2012

confused when I wrote this code. not a mistake here


Re: GetVehicleVelocity Problem - Madd Kat - 07.02.2012

did that fix it?
I know nothing about forwards yet just noticed that typo..


Re: GetVehicleVelocity Problem - cs_waller - 07.02.2012

Nothing was fixed :X


Re: GetVehicleVelocity Problem - iTorran - 07.02.2012

pawn Код:
if(GetVehicleVelocity < 60)
https://sampwiki.blast.hk/wiki/GetVehicleVelocity


Re: GetVehicleVelocity Problem - Madd Kat - 07.02.2012

is there a ; after the forward?

pawn Код:
forward SpeedControl(vehicleid,playerid);



Re: GetVehicleVelocity Problem - cs_waller - 07.02.2012

I fixed the error from forward but now I have one error.

error 076: syntax error in the expression, or invalid function call

ERROR LINE:
pawn Код:
if(GetVehicleVelocity < 60)



Re: GetVehicleVelocity Problem - Madd Kat - 07.02.2012

Quote:
Originally Posted by iTorran
Посмотреть сообщение
pawn Код:
if(GetVehicleVelocity < 60)
https://sampwiki.blast.hk/wiki/GetVehicleVelocity
like he said

your not using the function correctly, read the wiki.


Re: GetVehicleVelocity Problem - thimo - 07.02.2012

You cant even get the velocity like that... Like iTorran said use the proper call https://sampwiki.blast.hk/wiki/GetVehicleVelocity