Warning 213: tag mismatch
#1

Код:
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)");
                }
            }
	}
    }
Reply
#2

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

Same freaking warning
Reply
#4

Lol give us the line
Reply
#5

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

Okay, finally.

Anyway GetPlayerSpeed2 returns a float or a integer?
Reply
#7

Can you post the GetPlayerSpeed2 method?
Reply
#8

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

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

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.

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)