Rand tag mismatch
#1

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

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

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

Try this:

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

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

Aren't You born locally?
Reply
#7

Nvm I fixed. with
SetCameraBehindPlayer(playerid);
Reply
#8

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)