local variable "Pos" shadows a variable at a preceding level
#6

Quote:
Originally Posted by Toroi
Посмотреть сообщение
What value what?

Rename the variable

PHP код:
 new Float:Pos[3]; 
to
PHP код:
 new Float:fPos[3]; 
or whatever you want and make sure the rest of the code that involves that variable gets its name changed aswell, like the following code:
PHP код:
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]); 
would be
PHP код:
GetPlayerPos(playeridfPos[0], fPos[1], fPos[2]); 
This is really a bad workaround because it implies that there exists a global variable simply named "Pos", which is very bad practice.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)