OnPlayerText - 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: OnPlayerText (
/showthread.php?tid=634110)
OnPlayerText -
Thanks - 13.05.2017
Sup, There a 4errors on one line
Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '1' && HouseBuy1[playerid] == 1)
{
SendClientMessage(playerid, -1, "You cannot purchase this house Right now {FFFFFF}[{00FFFF}Its not available Yet{FFFFFF}]");
HideDraw(playerid);
}
return 1;
}
PHP код:
error 028: invalid subscript (not an array or too many subscripts): "HouseBuy1"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Respuesta: OnPlayerText -
Ignaciodmr - 13.05.2017
Which is the line with those errors?
Also, put the line in which you declare "HouseBuy1"
Also HideDraw is not a function
Respuesta: OnPlayerText -
Ignaciodmr - 13.05.2017
Also, replace this:
Код:
SendClientMessage(playerid, -1, "You cannot purchase this house Right now {FFFFFF}[{00FFFF}Its not available Yet{FFFFFF}]");
With this:
Код:
SendClientMessage(playerid, -1, "You cannot purchase this house Right now {FFFFFF}{00FFFF}Its not available Yet{FFFFFF}");
Re: OnPlayerText -
Thanks - 13.05.2017
Here the line of bug
if(text[0] == '1' && HouseBuy1[playerid] == 1)
Respuesta: OnPlayerText -
Ignaciodmr - 13.05.2017
Put the line in which you declare "HouseBuy1"
Re: OnPlayerText -
Tord - 13.05.2017
Most likely, HouseBuy1 is not defined with [MAX_PLAYERS] making it a variable, not an array.
That's what i can read from the error. In order to use HouseBuy1[playerid], make sure it's defined like this:
PHP код:
new HouseBuy1[MAX_PLAYERS];
That also requires you to change the variable wherever else it has been used.
Re: OnPlayerText -
RedRex - 13.05.2017
Wrong...
Re: OnPlayerText -
Tord - 13.05.2017
Quote:
Originally Posted by RedRex
Wrong...
|
Perhaps you can state why "what" is wrong?
Saying "wrong" helps noone. Useless reply in my opinion, you don't even tell what you claim is wrong.
Re: OnPlayerText -
ProBro - 13.05.2017
https://sampwiki.blast.hk/wiki/OnPlayerText
According to that This function is called
Код:
Called when a player sends a chat message.
RedRex is right,It's wrong,Paste some more code? Can you?