SA-MP Forums Archive
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: Tag Mismatch (/showthread.php?tid=496407)



Tag Mismatch - Aerotactics - 21.02.2014

After doing several searches and coming up empty, I have a problem in this script. It's not my script, so I don't know how to fix it:
pawn Код:
stock SpawnToHospital(playerid)
{
    dead[playerid] = 0;
    static const hspawns[][4] =
    {
        {2034.1670,-1406.0623,17.2181, 150.4297}, //tag mismatch
        {1177.3391,-1324.2300,14.0658,268.3749} //tag mismatch
    };
    new Float:spawndist[2];  // Change to the number of hospital spawnpoints you use.
    new Float:distance = 10000.0, closestspawn;
    spawndist[0] = GetPlayerDistanceFromPoint(playerid, 2034.1670,-1406.0623,17.2181);
    spawndist[1] = GetPlayerDistanceFromPoint(playerid, 1177.3391,-1324.2300,14.0658);
    for(new i = 0; i < sizeof(spawndist); i++)
    {
        if(spawndist[i] < distance) distance = spawndist[i], closestspawn = i;
    }
    SetPlayerPos(playerid, hspawns[closestspawn][0], hspawns[closestspawn][1], hspawns[closestspawn][2]);
    SetPlayerFacingAngle(playerid, hspawns[closestspawn][3]);
}
EDIT: RESOLVED! hspawns needs to float: "Float:hspawns..."


Re: Tag Mismatch - Aerotactics - 22.02.2014

Bump


Re: Tag Mismatch - Equuuuin0X - 22.02.2014

It seems like you placed the wrong coordinates.

it should be liike this

Код:
        {-1406.0623,17.2181, 150.4297}, 
        {-1324.2300,14.0658,268.3749}



Re: Tag Mismatch - Aerotactics - 22.02.2014

Quote:
Originally Posted by Equuuuin0X
Посмотреть сообщение
It seems like you placed the wrong coordinates.

it should be liike this

Код:
        {-1406.0623,17.2181, 150.4297}, 
        {-1324.2300,14.0658,268.3749}
Actually, the problem was that the coords needed to float haha, thanks for your help though.