tag mismach ? - 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: tag mismach ? (
/showthread.php?tid=299340)
tag mismach ? -
HondaCBR - 25.11.2011
I want to set the fuel price to $1 per liter so when you offer fuel to someone it gives him 100 in the tank so if he had like 60, he will pay 40
But money = 100 - Vehicle3[vehicle][Fuel]; gives me a tag mismach, any ideas?
pawn Код:
new playa;
playa = ReturnUser(tmp);
new money;
new vehicle = GetPlayerVehicleID(playa);
if(IsPlayerInVehicle(playa, vehicle))
{
money = 100 - Vehicle3[vehicle][Fuel];
}
Re: tag mismach ? -
Calgon - 25.11.2011
Your fuel variable is probably a float, which is basically a number which is a number that includes decimal points.
You'll need to
round your float variable to the nearest whole number.
pawn Код:
money = 100 - floatround(Vehicle3[vehicle][Fuel], floatround_round);
Re: tag mismach ? -
HondaCBR - 25.11.2011
thx, it works