SA-MP Forums Archive
[Solved] 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Solved] tag mismatch (/showthread.php?tid=256331)



[Solved] tag mismatch - KoczkaHUN - 20.05.2011

pawn Код:
// lots of code
enum KMOraEnum { csik, benzin, sebesseg, szazmeter, kilometer };
new Text:kmora[MAX_VEHICLES][KMOraEnum];
// lots of code
public OnVehicleSpeedChange(vehicleid, newspeed, oldspeed)
{
    if (GetPlayerVehicleID(veh[vehicleid][0]) == vehicleid)
    {
        new sbsg[10];
        format(sbsg, sizeof(sbsg), "%d km/h", newspeed);
        TextDrawSetString(kmora[vehicleid][sebesseg], sbsg); // line 149
    if (newspeed > 50)
        {
            if (newspeed > 80)
            {
                TextDrawColor(kmora[vehicleid][sebesseg], 0xff0000cc); // line 154
        }
        else
        {
             TextDrawColor(kmora[vehicleid][sebesseg], 0xffff00cc); // line 158
            }
        }
        else
        {
            TextDrawColor(kmora[vehicleid][sebesseg], 0xffffffcc); // line 163
        }
    }
}
// .........rest of code....
Quote:

L:\dir\gm.pwn(149) : warning 213: tag mismatch
L:\dir\gm.pwn(154) : warning 213: tag mismatch
L:\dir\gm.pwn(15 : warning 213: tag mismatch
L:\dir\gm.pwn(163) : warning 213: tag mismatch

Why? I don't get it... please help


Re: [helpme] tag mismatch - KoczkaHUN - 20.05.2011

lol I've got it it's not enough to prefix the "kmora" variable with Text: tag, the enumerator should be prefixed too...
pawn Код:
enum KMOraEnum { Text:csik, Text:benzin, Text:sebesseg, Text:szazmeter, Text:kilometer };