Tag Mismatch - Help please :D
#1

I am in the process of making a mini vehicle ownership script for my new RPG gamemode, and this has stopped me;
pawn Код:
C:\Users\administator\Desktop\GTS-DM - Copy\gamemodes\drp.pwn(438) : warning 213: tag mismatch
C:\Users\administator\Desktop\GTS-DM - Copy\gamemodes\drp.pwn(439) : warning 213: tag mismatch
C:\Users\administator\Desktop\GTS-DM - Copy\gamemodes\drp.pwn(440) : warning 213: tag mismatch
C:\Users\administator\Desktop\GTS-DM - Copy\gamemodes\drp.pwn(441) : warning 213: tag mismatch
C:\Users\administator\Desktop\GTS-DM - Copy\gamemodes\drp.pwn(462) : warning 213: tag mismatch
C:\Users\administator\Desktop\GTS-DM - Copy\gamemodes\drp.pwn(463) : warning 213: tag mismatch
C:\Users\administator\Desktop\GTS-DM - Copy\gamemodes\drp.pwn(464) : warning 213: tag mismatch
C:\Users\administator\Desktop\GTS-DM - Copy\gamemodes\drp.pwn(465) : warning 213: tag mismatch
Lines:
pawn Код:
438     if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carx", xx);
439     if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("cary", yy);
440     if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carz", zz);
441     if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carza", z_rot);
--
462     if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carxx", Float:xx);
463     if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("caryy", Float:yy);
464     if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carzz", Float:zz);
465     if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carza", z_rot);
Full code:
pawn Код:
if (strcmp(cmd, "/buyveh", false) == 0)
    {
    new Float:xx, Float:yy, Float:zz, Float:z_rot;
    new vehid, vehid1;
        new vehicleid;
        if (IsPlayerInAnyVehicle(playerid))
        {
        vehid1 = GetPlayerVehicleID(vehicleid);
        vehid = GetVehicleModel(vehid1);
        GetVehicleZAngle(vehid,z_rot);
        new color1, color2;
        GetVehicleColor(vehid, color1, color2);
        GetVehiclePos(vehid,xx,yy,zz);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carid", vehid);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carx", xx);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("cary", yy);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carz", zz);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carza", z_rot);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carc1", color1);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carc2", color2);
        }
    return 1;
    }
    if (strcmp(cmd, "/saveveh", false) == 0)
    {
    new Float:xx, Float:yy, Float:zz, Float:z_rot;
    new vehid, vehid1;
        new vehicleid;
        if (IsPlayerInAnyVehicle(playerid))
        {
        vehid1 = GetPlayerVehicleID(vehicleid);
        vehid = GetVehicleModel(vehid1);
        GetVehicleZAngle(vehid,z_rot);
        GetVehiclePos(vehid,xx,yy,zz);
        DestroyVehicle(vehid1);
        new color1, color2;
        GetVehicleColor(vehicleid, color1, color2);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carid", vehid);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carxx", Float:xx);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("caryy", Float:yy);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carzz", Float:zz);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carza", z_rot);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carc1", color1);
        if (logged[playerid] == 1) dUserSetINT(PlayerName(playerid)).("carc2", color2);
        }
    return 1;
    }
NOTE: I have the GetVehicleColor function, however, this is not the issue.
NOTE 2: The RPG script is from scratch, not GF/PEN1 based

Thanks
~Dak
Reply
#2

Untested, but might work:
pawn Код:
if (strcmp(cmd, "/buyveh", false) == 0)
{
new Float:xx, Float:yy, Float:zz, Float:z_rot;
new vehid, vehid1;
new vehicleid;
if (IsPlayerInAnyVehicle(playerid))
{
vehid1 = GetPlayerVehicleID(vehicleid);
vehid = GetVehicleModel(vehid1);
GetVehicleZAngle(vehid,z_rot);
new color1, color2;
GetVehicleColor(vehid, color1, color2);
GetVehiclePos(vehid,xx,yy,zz);
if (logged[playerid] == 1)
{
  dUserSetINT(PlayerName(playerid)).("carid", vehid);
  dUserSetINT(PlayerName(playerid)).("carx", floatround(xx));
  dUserSetINT(PlayerName(playerid)).("cary", floatround(yy));
  dUserSetINT(PlayerName(playerid)).("carz", floatround(zz));
  dUserSetINT(PlayerName(playerid)).("carza",floatround( z_rot));
  dUserSetINT(PlayerName(playerid)).("carc1", color1);
  dUserSetINT(PlayerName(playerid)).("carc2", color2);
}
}
return 1;
}
if (strcmp(cmd, "/saveveh", false) == 0)
{
new Float:xx, Float:yy, Float:zz, Float:z_rot;
new vehid, vehid1;
new vehicleid;
if (IsPlayerInAnyVehicle(playerid))
{
vehid1 = GetPlayerVehicleID(vehicleid);
vehid = GetVehicleModel(vehid1);
GetVehicleZAngle(vehid,z_rot);
GetVehiclePos(vehid,xx,yy,zz);
DestroyVehicle(vehid1);
new color1, color2;
GetVehicleColor(vehicleid, color1, color2);
if (logged[playerid] == 1)
{
  dUserSetINT(PlayerName(playerid)).("carid", vehid);
  dUserSetINT(PlayerName(playerid)).("carxx", floatround(xx));
  dUserSetINT(PlayerName(playerid)).("caryy", floatround(yy));
  dUserSetINT(PlayerName(playerid)).("carzz", floatround(zz));
  dUserSetINT(PlayerName(playerid)).("carza", floatround(z_rot));
  dUserSetINT(PlayerName(playerid)).("carc1", color1);
  dUserSetINT(PlayerName(playerid)).("carc2", color2);
}
}
return 1;
}
Reply
#3

Quote:
Originally Posted by [RPr
Icy_Cold ]
Untested, but might work:
pawn Код:
if (strcmp(cmd, "/buyveh", false) == 0)
{
new Float:xx, Float:yy, Float:zz, Float:z_rot;
new vehid, vehid1;
new vehicleid;
if (IsPlayerInAnyVehicle(playerid))
{
vehid1 = GetPlayerVehicleID(vehicleid);
vehid = GetVehicleModel(vehid1);
GetVehicleZAngle(vehid,z_rot);
new color1, color2;
GetVehicleColor(vehid, color1, color2);
GetVehiclePos(vehid,xx,yy,zz);
if (logged[playerid] == 1)
{
 dUserSetINT(PlayerName(playerid)).("carid", vehid);
 dUserSetINT(PlayerName(playerid)).("carx", floatround(xx));
 dUserSetINT(PlayerName(playerid)).("cary", floatround(yy));
 dUserSetINT(PlayerName(playerid)).("carz", floatround(zz));
 dUserSetINT(PlayerName(playerid)).("carza",floatround( z_rot));
 dUserSetINT(PlayerName(playerid)).("carc1", color1);
 dUserSetINT(PlayerName(playerid)).("carc2", color2);
}
}
return 1;
}
if (strcmp(cmd, "/saveveh", false) == 0)
{
new Float:xx, Float:yy, Float:zz, Float:z_rot;
new vehid, vehid1;
new vehicleid;
if (IsPlayerInAnyVehicle(playerid))
{
vehid1 = GetPlayerVehicleID(vehicleid);
vehid = GetVehicleModel(vehid1);
GetVehicleZAngle(vehid,z_rot);
GetVehiclePos(vehid,xx,yy,zz);
DestroyVehicle(vehid1);
new color1, color2;
GetVehicleColor(vehicleid, color1, color2);
if (logged[playerid] == 1)
{
 dUserSetINT(PlayerName(playerid)).("carid", vehid);
 dUserSetINT(PlayerName(playerid)).("carxx", floatround(xx));
 dUserSetINT(PlayerName(playerid)).("caryy", floatround(yy));
 dUserSetINT(PlayerName(playerid)).("carzz", floatround(zz));
 dUserSetINT(PlayerName(playerid)).("carza", floatround(z_rot));
 dUserSetINT(PlayerName(playerid)).("carc1", color1);
 dUserSetINT(PlayerName(playerid)).("carc2", color2);
}
}
return 1;
}
Aww cool, thanks, now off to get the whole thing working...
Which I am doing...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)