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



rand tag mismatch - DerickClark - 07.03.2014

Tag mismatch?
pawn Код:
(318) : warning 213: tag mismatch
(318) : warning 213: tag mismatch
(318) : warning 213: tag mismatch
(319) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Warnings.
pawn Код:
new rand = random(sizeof(TruckerSpawn));
       SetPlayerPos(playerid, TruckerSpawn[rand][0], TruckerSpawn[rand][1], TruckerSpawn[rand][2]);
       SetPlayerFacingAngle(playerid, TruckerSpawn[rand][3]);



Re: Rand tag mismatch - Threshold - 07.03.2014

Did you add the 'Float' tag to TruckerSpawn?

Example:
pawn Код:
new Float:TruckerSpawn[][4]
{
    {1002.5, 5434.2, 100.3, 90.2},
    {5662.3, 1048.5, 2056.2, 144.5},
    //Etc...
}



Re: Rand tag mismatch - DerickClark - 07.03.2014

Here my enum
pawn Код:
enum SpawnLocation
{
    Float:SpawnX,
    Float:SpawnY,
    Float:SpawnZ,
    Float:SpawnAngle
}

new TruckerSpawn[][SpawnLocation] =
{
    // Positions, (X, Y, Z and Facing Angle)
    {-1278.0699,2709.5935,50.2663,299.5070}
};



Re: Rand tag mismatch - Marlon_Lorran - 07.03.2014

Try this:

Код:
new rand = random(sizeof(TruckerSpawn));
       SetPlayerPos(playerid, TruckerSpawn[rand][SpawnX], TruckerSpawn[rand][SpawnY], TruckerSpawn[rand][SpawnZ]);
       SetPlayerFacingAngle(playerid, TruckerSpawn[rand][SpawnAngle]);



Re: Rand tag mismatch - DerickClark - 07.03.2014

Quote:
Originally Posted by Marlon_Lorran
Посмотреть сообщение
Try this:

Код:
new rand = random(sizeof(TruckerSpawn));
       SetPlayerPos(playerid, TruckerSpawn[rand][SpawnX], TruckerSpawn[rand][SpawnY], TruckerSpawn[rand][SpawnZ]);
       SetPlayerFacingAngle(playerid, TruckerSpawn[rand][SpawnAngle]);
Thanks. how I fix facing. not facing where I put the spawn at.


Re: Rand tag mismatch - Marlon_Lorran - 07.03.2014

Aren't You born locally?


Re: Rand tag mismatch - DerickClark - 07.03.2014

Nvm I fixed. with
SetCameraBehindPlayer(playerid);


Re: Rand tag mismatch - Marlon_Lorran - 07.03.2014

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
...?
Nothing ... I got it wrong, I'm happy to have helped even more


Re: Rand tag mismatch - DerickClark - 07.03.2014

Quote:
Originally Posted by Marlon_Lorran
Посмотреть сообщение
Nothing ... I got it wrong, I'm happy to have helped even more
oh Thank you, and all.