SA-MP Forums Archive
can't use '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: can't use 'playerid' (/showthread.php?tid=645090)



can't use 'playerid' - rakinz - 19.11.2017

Код:
forward PayDay();
public PayDay()
{
SendClientMessage(playerid, COLOR_BLUE, ""COL_WHITE"[------"COL_BLUE"Pay Day!"COL_WHITE"-------]");
}
error 017: undefined symbol "playerid"

Someone can explain why I can't use it?


Re: can't use 'playerid' - JaydenJason - 19.11.2017

The function doesn't have a "playerid" parameter


Re: can't use 'playerid' - rakinz - 19.11.2017

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
The function doesn't have a "playerid" parameter
So how can I make this? or a payday every 'x' time?


Re: can't use 'playerid' - Swankeh - 19.11.2017

Quote:
Originally Posted by rakinz
Посмотреть сообщение
Код:
forward PayDay();
public PayDay()
{
SendClientMessage(playerid, COLOR_BLUE, ""COL_WHITE"[------"COL_BLUE"Pay Day!"COL_WHITE"-------]");
}
error 017: undefined symbol "playerid"

Someone can explain why I can't use it?
public PayDay(playerid)
{
SendClientMessage(playerid, COLOR_BLUE, ""COL_WHITE"[------"COL_BLUE"Pay Day!"COL_WHITE"-------]");
}
When creating a function you have the possibility to put parameters in this case you would occupy a parameter that would be playerid, they can have more parameters and you call them as it is but for me it is more comfortable to call them as in the functions


Re: can't use 'playerid' - rakinz - 19.11.2017

Quote:
Originally Posted by Swankeh
Посмотреть сообщение
public PayDay(playerid)
{
SendClientMessage(playerid, COLOR_BLUE, ""COL_WHITE"[------"COL_BLUE"Pay Day!"COL_WHITE"-------]");
}
When creating a function you have the possibility to put parameters in this case you would occupy a parameter that would be playerid, they can have more parameters and you call them as it is but for me it is more comfortable to call them as in the functions
Thanks a lot!! appreciate
+reppp