Create a variable equal to the current value of another variable (create a constant)
#4

Quote:
Originally Posted by WellDone
View Post
DeathOnaStick,
thanks, but

pawn Code:
new Float:pos[3],Float:Angle;
GetPlayerPos(i,pos[0],pos[1],pos[2]);
GetPlayerFacingAngle(i,Angle);
new const lesX = pos[0]; //2668
new const lesY = pos[1]; //2669
new const lesZ = pos[2]; //2670
new const lesA = Angle; //2671
and then

pawn Code:
SetPlayerPos(i,lesX,lesY,lesZ);
SetPlayerFacingAngle(i,lesA);

I'm getting

pawn Code:
C:\SAMP\mod1.pwn(2668) : warning 213: tag mismatch
C:\SAMP\mod1.pwn(2669) : warning 213: tag mismatch
C:\SAMP\mod1.pwn(2670) : warning 213: tag mismatch
C:\SAMP\mod1.pwn(2671) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:           5272 bytes
Code size:          1115648 bytes
Data size:          3882756 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4922 cells (19688 bytes)
Total requirements: 5020060 bytes

4 Warnings.

and the game is starting to lag heavily when SetPlayerPos is called with this code.
To fix the tag missmatch try this:
pawn Code:
new Float:pos[3],Float:Angle;
GetPlayerPos(i,pos[0],pos[1],pos[2]);
GetPlayerFacingAngle(i,Angle);
new const Float:lesX = pos[0]; //2668
new const Float:lesY = pos[1]; //2669
new const Float:lesZ = pos[2]; //2670
new const Float:lesA = Angle; //2671
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)