Error 035: argument type mismatch (argument 2) - 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 035: argument type mismatch (argument 2) (
/showthread.php?tid=335736)
Error 035: argument type mismatch (argument 2) -
Toshh - 19.04.2012
Here is the line of code it says the error is in:
Код:
GetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.0);
Am I putting this line in a section it isn't mean't to be in? I put it under OnPlayerKeyStateChange because i'm trying to make it so when you press the horn button your vehicle gets boosted.
Someone help me please?
Re: Error 035: argument type mismatch (argument 2) -
Mark™ - 19.04.2012
https://sampwiki.blast.hk/wiki/GetVehicleVelocity
Re: Error 035: argument type mismatch (argument 2) -
sleepysnowflake - 19.04.2012
Let me fix that ...
pawn Код:
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayervehicleID(playerid), x, y, z);
More on GetVehicleVelocity
here.
Re: Error 035: argument type mismatch (argument 2) - Moh_ - 19.04.2012
you are getting the vehicle velocity
so you must store the values in order to print them somewhere.
eg:
pawn Код:
new Float:Value[3], string[150];
GetVehicleVelocity(GetPlayerVehicleID(playerid), Value[0], Value[1], Value[2]);
format(string, sizeof(string), "Velocity: X%f Y%f Z%f ", Value[0], Value[1], Value[2]);
SendClientMessage(playerid, -1, string);
edit: too late xD
Re: Error 035: argument type mismatch (argument 2) -
sleepysnowflake - 19.04.2012
That's one bad habit you got there, the poster above me. Why making the string 150 when you don't even use half those characters?
Re: Error 035: argument type mismatch (argument 2) -
Toshh - 19.04.2012
Thanks, it worked
Re: Error 035: argument type mismatch (argument 2) - Moh_ - 19.04.2012
Quote:
Originally Posted by Berlovan
That's one bad habit you got there, the poster above me. Why making the string 150 when you don't even use half those characters?
|
before posting it had more text but i deleted to make it smaller.