Tag mismatch help. -
Cepillado300 - 09.02.2014
Hi, I'm trying to create a vehicle system based on this tutorial
https://sampforum.blast.hk/showthread.php?tid=416104 but I want to add more stuff than just what the tutorial has, and now I get 3 tag mismatch warnings.
Here's the stock:
Код:
VehicleCreate(Modelo, Posx, Posy, Posz, Ang, Color1, Color2, Pintura, Dueno[], Nombre[], Spoiler, DefensaD, DefensaT, Lampara, Hidraulicos, Ruedas, Escape, Capo, Techo, Ventanillas, Nitro)
And here's the function that its used on VehicleLoad the VehicleCreate line is the line where I get the 3 tag mismatch warnings);
Код:
new Float:Posx;
new Float:Posy;
new Float:Posz;
new Float:Ang;
new Color1;
new Color2;
sscanf(Vehiculo[vehicleid][vPos],"p<,>ffff",Posx,Posy,Posz,Ang);
sscanf(Vehiculo[vehicleid][vColores],"p<,>ii",Color1, Color2);
VehicleCreate(Vehiculo[vehicleid][vModelo], Posx, Posy, Posz, Ang, Color1, Color2, Vehiculo[vehicleid][vPaintjob], Vehiculo[vehicleid][vDueno], Vehiculo[vehicleid][vNombre], Vehiculo[vehicleid][vPlaca], Vehiculo[vehicleid][vSpoiler], Vehiculo[vehicleid][vDefensaD], Vehiculo[vehicleid][vDefensaT], Vehiculo[vehicleid][vLampara], Vehiculo[vehicleid][vHidraulicos], Vehiculo[vehicleid][vRuedas], Vehiculo[vehicleid][vEscape], Vehiculo[vehicleid][vCapo], Vehiculo[vehicleid][vTecho], Vehiculo[vehicleid][vVentanillas], Vehiculo[vehicleid][vNitro]);
Respuesta: Tag mismatch help. -
Cepillado300 - 10.02.2014
It's been 24 hours, so... bump.
Respuesta: Tag mismatch help. -
EduGTA - 10.02.2014
pawn Код:
VehicleCreate(Modelo, Posx, Posy, Posz, Ang, Color1, Color2, Pintura, Dueno[], Nombre[], Spoiler, DefensaD, DefensaT, Lampara, Hidraulicos, Ruedas, Escape, Capo, Techo, Ventanillas, Nitro)
pawn Код:
VehicleCreate(Vehiculo[vehicleid][vModelo], Posx, Posy, Posz, Ang, Color1, Color2, Vehiculo[vehicleid][vPaintjob], Vehiculo[vehicleid][vDueno], Vehiculo[vehicleid][vNombre], Vehiculo[vehicleid][vPlaca], Vehiculo[vehicleid][vSpoiler], Vehiculo[vehicleid][vDefensaD], Vehiculo[vehicleid][vDefensaT], Vehiculo[vehicleid][vLampara], Vehiculo[vehicleid][vHidraulicos], Vehiculo[vehicleid][vRuedas], Vehiculo[vehicleid][vEscape], Vehiculo[vehicleid][vCapo], Vehiculo[vehicleid][vTecho], Vehiculo[vehicleid][vVentanillas], Vehiculo[vehicleid][vNitro]);
Looks like you've got an extra param in the function, "Vehiculo[vehicleid][vPlaca]".
Have you tried removing it?
PD: otro venezolano
Re: Tag mismatch help. -
[KHK]Khalid - 10.02.2014
Since
Posx, Posy, Posz and Ang are used as variables of the type 'float', you have to give them Float: tag inside the function header as well. Your function declaration should look like:
pawn Код:
stock VehicleCreate(Modelo, Float:Posx, Float:Posy, Float:Posz, Float:Ang, Color1, Color2, Pintura, Dueno[], Nombre[], Spoiler, DefensaD, DefensaT, Lampara, Hidraulicos, Ruedas, Escape, Capo, Techo, Ventanillas, Nitro)
For more about 'tags', check
this article!
Edit:
Quote:
Originally Posted by Edugta.
pawn Код:
VehicleCreate(Modelo, Posx, Posy, Posz, Ang, Color1, Color2, Pintura, Dueno[], Nombre[], Spoiler, DefensaD, DefensaT, Lampara, Hidraulicos, Ruedas, Escape, Capo, Techo, Ventanillas, Nitro)
pawn Код:
VehicleCreate(Vehiculo[vehicleid][vModelo], Posx, Posy, Posz, Ang, Color1, Color2, Vehiculo[vehicleid][vPaintjob], Vehiculo[vehicleid][vDueno], Vehiculo[vehicleid][vNombre], Vehiculo[vehicleid][vPlaca], Vehiculo[vehicleid][vSpoiler], Vehiculo[vehicleid][vDefensaD], Vehiculo[vehicleid][vDefensaT], Vehiculo[vehicleid][vLampara], Vehiculo[vehicleid][vHidraulicos], Vehiculo[vehicleid][vRuedas], Vehiculo[vehicleid][vEscape], Vehiculo[vehicleid][vCapo], Vehiculo[vehicleid][vTecho], Vehiculo[vehicleid][vVentanillas], Vehiculo[vehicleid][vNitro]);
Looks like you've got an extra param in the function, "Vehiculo[vehicleid][vPlaca]".
Have you tried removing it?
PD: otro venezolano
|
No, there are no extra params in the function. If he had an extra param, it'd throw "
Number of arguments does not match definition".
Respuesta: Tag mismatch help. -
Cepillado300 - 11.02.2014
Thank you, it worked, I forgot that floats aren't defined by default.
And also thanks for the article, I really appreciate stuff like that, I'll learn how tags work a little better now.