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)
+--- Thread: Undefined symbol: playerid (
/showthread.php?tid=662104)
Undefined symbol: playerid -
Rubennatan - 23.12.2018
Hello guys, i was trying to make a door open automaticly when i get closer to it without any command, but i get this error and i dont know how to figure it out.
i got 3 errors on every line where playerid" stands.
PS: im new to scripting :3
Код:
forward puertaDeCasa();
public puertaDeCasa()
{
new pName [MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof pName);
if(IsPlayerInRangeOfPoint(playerid, 2.0, -4092.5371, 933.6587, 11.0847))
{
if(strcmp(pName, "Ruben", true) == 0)
{
MoveObject(puertamicasa, -4093.2437, 932.9705, 9.9065, 3, 0, 0);
}
else return mesaj(playerid, COLOR_RED, "Youґre not the owner!");
}
return 1;
}
Re: Undefined symbol: playerid -
Jularra - 23.12.2018
Код:
forward puertaDeCasa(playerid);
public puertaDeCasa(playerid)
When you call it, you have to add ' playerid ' arg. to the function.
e.g
Код:
puertaDeCasa(playerid);
Re: Undefined symbol: playerid -
Rubennatan - 23.12.2018
yes sir, it worked, thanks a lot man!