Undefined symbol: playerid
#1

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;
}
Reply
#2

Код:
forward puertaDeCasa(playerid);
public puertaDeCasa(playerid)
When you call it, you have to add ' playerid ' arg. to the function.

e.g

Код:
puertaDeCasa(playerid);
Reply
#3

yes sir, it worked, thanks a lot man!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)