SA-MP Forums Archive
Warning 213: 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: Warning 213: tag mismatch (/showthread.php?tid=415993)



Warning 213: tag mismatch - Tingesport - 15.02.2013

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(IsDMVCar(vehicleid))
    {
        if(!LicenseTest[playerid])
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                new dmvspeed = GetPlayerSpeed2(playerid); <---- THIS IS WHERE I GET THE WARNING.
                if (dmvspeed >= 90)
                {
                    DisablePlayerCheckpoint(playerid);
                    LicenseTest[playerid] = 0;
                    CP[playerid] = 0;
                    SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Driving Center: You were going to fast, therefore your test has been failed. (90 KM/H)");
                }
            }
	}
    }



Re: Warning 213: tag mismatch - ReVo_ - 15.02.2013

new dmvspeed = GetPlayerSpeed2(playerid);

I Think GetPlayerSpeed2 returns a float so try new Float:dmvspeed;

Anyway, thanks for say the line where the warning appear


Re: Warning 213: tag mismatch - Tingesport - 15.02.2013

Same freaking warning


Re: Warning 213: tag mismatch - ReVo_ - 15.02.2013

Lol give us the line


Re: Warning 213: tag mismatch - Tingesport - 15.02.2013

I gave you the line, 15168, clearly marked with a red color!


Re: Warning 213: tag mismatch - ReVo_ - 15.02.2013

Okay, finally.

Anyway GetPlayerSpeed2 returns a float or a integer?


Re: Warning 213: tag mismatch - Chris White - 15.02.2013

Can you post the GetPlayerSpeed2 method?


Re: Warning 213: tag mismatch - Tingesport - 15.02.2013

Fixed it, added a new GetPlayerSpeed Stock.

Код:
stock GetPlayerSpeed2(playerid)
{
    new Float:ST[4];
    if(IsPlayerInAnyVehicle(playerid))
    GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
    ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
    return floatround(ST[3]);
}



Re: Warning 213: tag mismatch - YoYo123 - 15.02.2013

Just change the problematic line to this:
pawn Код:
new Float:dmvspeed = GetPlayerSpeed2(playerid);



Re: Warning 213: tag mismatch - LetsOWN[PL] - 15.02.2013

Quote:
Originally Posted by ReVo_
Посмотреть сообщение
Okay, finally.

Anyway GetPlayerSpeed2 returns a float or a integer?
Float.

Greetz,
LetsOWN

Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 64 seconds.