GetVehicleVelocity Problem
#1

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 êèëîìåòðà è êàìåðàòà òå ôëàøíà è èìàø ãëîáà!");
    }
}
Reply
#2

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

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

confused when I wrote this code. not a mistake here
Reply
#4

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

Nothing was fixed :X
Reply
#6

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

is there a ; after the forward?

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

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)
Reply
#9

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.
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)