Undefined symbol playerid - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Undefined symbol playerid (
/showthread.php?tid=78095)
Undefined symbol playerid -
FreeSoul - 17.05.2009
This never happened to me before.
Quote:
public NewNames()
{
for(new i = 0;i < MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
for(new q = 0;q < MAX_PLAYERS;q++)
{
if(IsPlayerConnected(q))
{
new Float 1x;
new Float 1y;
new Float 1z;
new Float 2x;
new Float 2y;
new Float 2z;
if(IsPlayerConnected(i) && IsPlayerConnected(q))
{
GetPlayerPos(i,p1x,p1y,p1z);
GetPlayerPos(q,p2x,p2y,p2z);
if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x, p2y,p2z) < pdistance)
{
if (NameOff[playerid] == 1)
{
ShowPlayerNameTagForPlayer(i,q,0);
}
}
else
{
ShowPlayerNameTagForPlayer(i,q,1);
}
}
}
}
}
}
}
|
Playerid is an undefined symbol
Re: Undefined symbol playerid -
FUNExtreme - 17.05.2009
pawn Код:
if (NameOff[playerid] == 1)
Change the playerid in that line to i or q according to your code.
Re: Undefined symbol playerid -
AiVAMAN - 17.05.2009
should be
pawn Код:
public NewNames(playerid)
and forward should be
pawn Код:
forward NewNames(playerid);
hope this helped.
Re: Undefined symbol playerid -
(Jeff) - 07.10.2009
Quote:
Originally Posted by -Alive
should be
pawn Код:
public NewNames(playerid)
and forward should be
pawn Код:
forward NewNames(playerid);
hope this helped. 
|
Hello
I Got This Problem But With My Timers Should I Add Playerid In The Function? Or Should I Do Something else?
- (Jeff)
Re: Undefined symbol playerid -
dice7 - 07.10.2009
Quote:
Originally Posted by FUNExtreme
pawn Код:
if (NameOff[playerid] == 1)
Change the playerid in that line to i or q according to your code.
|
This -.-'
Re: Undefined symbol playerid -
(Jeff) - 07.10.2009
Quote:
Originally Posted by dice7
Quote:
Originally Posted by FUNExtreme
pawn Код:
if (NameOff[playerid] == 1)
Change the playerid in that line to i or q according to your code.
|
This -.-'
|
?
Код:
public WSHJAILCLOSE()
{
//MoveStreamObject (WSHJAILGATE,1690.070923, -2022.385620, 13.330789,1.5);
SetPlayerPos(playerid, 276.0656,1868.8894,8.7578);
SetCameraBehindPlayer(playerid);
return 1;
}
Whats the prob?
Re: Undefined symbol playerid -
(Jeff) - 07.10.2009
plz help this is urgent
Re: Undefined symbol playerid -
Virtual1ty - 07.10.2009
Quote:
public WSHJAILCLOSE()
{
//MoveStreamObject (WSHJAILGATE,1690.070923, -2022.385620, 13.330789,1.5);
SetPlayerPos(playerid, 276.0656,1868.8894,8.757 ;
SetCameraBehindPlayer(playerid);
return 1;
}
|
if you are defining the public function and using the "SetCameraBehindPlayer(playerid);" you should also put "playerid" here:
so now it will be:
pawn Код:
public WSHJAILCLOSE(playerid)
and also
pawn Код:
forward WSHJAILCLOSE(playerid);
Re: Undefined symbol playerid -
dice7 - 07.10.2009
Whoops, i thought you were the topic opener
And you need to use SetTimerEx for passing variables from a function to another
https://sampwiki.blast.hk/wiki/SetTimerEx