Tag mismatch
#1

Hi im trying to add random spawns to server but i get tag mismatch, this IS the code from wiki.sa-mp.com

pawn Код:
new Float:RandomSpawn[][4] =
{
{364.4431,2531.6606,16.2353,174},
{365.4431,2534.6606,14.2353,175},
{366.4431,2537.6606,17.2353,176}
};
Now for onplayerspawn

pawn Код:
new iRandom = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[iRandom][0], RandomSpawn[iRandom][1],RandomSpawn[iRandom][2]);
SetPlayerFacingAngle(playerid, RandomSpawn[iRandom][3]);

Then it gives this error...

C:\Users\Marc\Desktop\Samp Server(s)\Test\gamemodes\SP.pwn(57) : warning 213: tag mismatch
C:\Users\Marc\Desktop\Samp Server(s)\Test\gamemodes\SP.pwn(5 : warning 213: tag mismatch
C:\Users\Marc\Desktop\Samp Server(s)\Test\gamemodes\SP.pwn(59) : warning 213: tag mismatch


line 57 is first set of cords.
line 58 is second set
line 59 is 3rd set.
Reply
#2

174, 175, and 176 are integers not floats. Hence the tag mismatch.
Reply
#3

rofl thx didnt know that :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)