SA-MP Forums Archive
Tag mismatch - 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 mismatch (/showthread.php?tid=564532)



Tag mismatch - Cerealguy - 22.02.2015

pawn Код:
FinalDistance = GetVehicleDistanceFromPoint(GetPlayerVehicleID(playerid), GetPVarFloat(playerid,"MickyMouse"), GetPVarFloat(playerid,"MarioBross"), GetPVarFloat(playerid,"SpiderMan"));
її :/, <3


Re: Tag mismatch - admantis - 22.02.2015

What are you trying to do? Can you post a full snippet? That code doesn't make sense. You can't use commas to assign multiple values to a single variable. That's not how you use commas.

Ideally, your code should look like this (and I assume FinalDistance is a float):
FinalDistance = GetVehicleDistanceFromPoint(GetPlayerVehicleID(pla yerid));


AW: Re: Tag mismatch - Nero_3D - 22.02.2015

Quote:
Originally Posted by admantis
Посмотреть сообщение
What are you trying to do? Can you post a full snippet? That code doesn't make sense. You can't use commas to assign multiple values to a single variable. That's not how you use commas.

Ideally, your code should look like this (and I assume FinalDistance is a float):
FinalDistance = GetVehicleDistanceFromPoint(GetPlayerVehicleID(pla yerid));
https://sampwiki.blast.hk/wiki/GetVehicleDistanceFromPoint

Well the parameter have all the correct tag, so he probably just missed declaring FinalDistance as Float
pawn Код:
new
    Float: FinalDistance = (
        GetVehicleDistanceFromPoint(
            GetPlayerVehicleID(playerid),
            GetPVarFloat(playerid, "X"),
            GetPVarFloat(playerid, "Y"),
            GetPVarFloat(playerid, "Z")
        )
    )
;



Respuesta: Tag mismatch - Cerealguy - 22.02.2015

jajjaja, thanks