Tag mismatch help.
#1

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]);
Reply
#2

It's been 24 hours, so... bump.
Reply
#3

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
Reply
#4

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".
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)