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=139195)
Undefined symbol "playerid" -
Freddy Z - 04.04.2010
pawn Код:
//under OnPlayerCommandText
if(!strcmp("/activate",cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid,1, 1006.2309,1027.5194,48.1328))
{
SetPlayerPos(playerid,994.28308105469, 1051.5045166016, 60.0);
PlayerPlaySound(playerid, 1020, 0.0, 0.0, 0.0);
MoveObject(obj,994.28308105469, 1051.5045166016, 50.0, 8.00);
}
return 1;
}
return 0;
}
//under OnObjectMoved
public OnObjectMoved(objectid)
{
if(IsPlayerInRangeOfPoint(playerid, 10, 994.28308105469, 1051.5045166016, 50.0)) //this gives me undefined symbol "playerid"
MoveObject(obj,978.1339,2299.8567,49.3317,75);
return 1;
}
Re: Undefined symbol "playerid" -
Beaver07 - 04.04.2010
you haven't defined wat playerid should mean..
Код:
public OnObjectMoved(objectid)
{
if(IsPlayerInRangeOfPoint(playerid, 10, 994.28308105469, 1051.5045166016, 50.0)) //this gives me undefined symbol "playerid"
MoveObject(obj,978.1339,2299.8567,49.3317,75);
return 1;
}
should be
Код:
public OnObjectMoved(objectid)
{
for(new playerid=0; playerid < MAX_PLAYERS; playerid++)
{
if(IsPlayerInRangeOfPoint(playerid, 10, 994.28308105469, 1051.5045166016, 50.0)) //this gives me undefined symbol "playerid"
MoveObject(obj,978.1339,2299.8567,49.3317,75);
return 1;
}
}