Tag Mismatch
#1

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..."
Reply
#2

Bump
Reply
#3

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}
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)