[HELP]OnPlayerText Problem. - 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: [HELP]OnPlayerText Problem. (
/showthread.php?tid=340688)
[HELP]OnPlayerText Problem. -
TheBluec0de - 08.05.2012
Fail, solved
Re: [HELP]OnPlayerText Problem. -
2KY - 08.05.2012
pawn Код:
public OnPlayerText(playerid, text[])
{
if(UserInfo[playerid][USER_STAT_LOGGED] == true)
{
new
str[128 + (8 * 4)];
//
/* LINE 463 */ if(UserInfo[playerid][USER_STAT_ADMINISTRATOR] >= 1)
{
/* LINE 466 */ format(str, sizeof(str), ""#EMB_COL_RED"%s["#EMB_COL_WHITE"M"#EMB_COL_RED"]"#EMB_COL_WHITE": %s", _Name, text[0]);
SendClientMessageToAll(-1, str);
SetPlayerColor(playerid, COL_BLUE);
}
//
if(UserInfo[playerid][USER_STAT_MODERATOR] >= 1)
{
/* LINE 473 */ format(str, sizeof(str), ""#EMB_COL_BLUE"%s["#EMB_COL_WHITE"M"#EMB_COL_BLUE"]"#EMB_COL_WHITE": %s", _Name, text[0]);
SendClientMessageToAll(-1, str);
SetPlayerColor(playerid, COL_BLUE);
}
}
return 1;
}
Simple, you forgot a ; on your new declaration.
Re: [HELP]OnPlayerText Problem. -
newbienoob - 08.05.2012
You forgot " ; " It should be
Re: [HELP]OnPlayerText Problem. -
TzAkS. - 08.05.2012
new str[128 + (8 * 4)]
;
Edit: To late
Re: [HELP]OnPlayerText Problem. -
TheBluec0de - 08.05.2012
Yes, thanks
Re: [HELP]OnPlayerText Problem. -
JaKe Elite - 08.05.2012
pawn Код:
public OnPlayerText(playerid, text[])
{
if(UserInfo[playerid][USER_STAT_LOGGED] == true)
{
new
str[128 + (8 * 4)];
//
/* LINE 463 */ if(UserInfo[playerid][USER_STAT_ADMINISTRATOR] >= 1)
{
/* LINE 466 */ format(str, sizeof(str), ""#EMB_COL_RED"%s["EMB_COL_WHITE"M"EMB_COL_RED"]"EMB_COL_WHITE": %s", _Name, text[0]);
SendClientMessageToAll(-1, str);
SetPlayerColor(playerid, COL_BLUE);
}
//
if(UserInfo[playerid][USER_STAT_MODERATOR] >= 1)
{
/* LINE 473 */ format(str, sizeof(str), ""#EMB_COL_BLUE"%s["EMB_COL_WHITE"M"EMB_COL_BLUE"]"EMB_COL_WHITE": %s", _Name, text[0]);
SendClientMessageToAll(-1, str);
SetPlayerColor(playerid, COL_BLUE);
}
}
return 1;
}
or try removing EMB_
to avoid the syntax error...
Re: [HELP]OnPlayerText Problem. -
2KY - 08.05.2012
Quote:
Originally Posted by Romel
pawn Код:
public OnPlayerText(playerid, text[]) { if(UserInfo[playerid][USER_STAT_LOGGED] == true) { new str[128 + (8 * 4)]; // /* LINE 463 */ if(UserInfo[playerid][USER_STAT_ADMINISTRATOR] >= 1) { /* LINE 466 */ format(str, sizeof(str), ""#EMB_COL_RED"%s["EMB_COL_WHITE"M"EMB_COL_RED"]"EMB_COL_WHITE": %s", _Name, text[0]); SendClientMessageToAll(-1, str); SetPlayerColor(playerid, COL_BLUE); } // if(UserInfo[playerid][USER_STAT_MODERATOR] >= 1) { /* LINE 473 */ format(str, sizeof(str), ""#EMB_COL_BLUE"%s["EMB_COL_WHITE"M"EMB_COL_BLUE"]"EMB_COL_WHITE": %s", _Name, text[0]); SendClientMessageToAll(-1, str); SetPlayerColor(playerid, COL_BLUE); } } return 1; }
or try removing EMB_
to avoid the syntax error...
|
There wouldn't be a syntax error associated with that..
pawn Код:
#define EMB_COL_WHITE "{FFFFFF}"
It works perfectly fine.
Re: [HELP]OnPlayerText Problem. -
TheBluec0de - 08.05.2012
Quote:
Originally Posted by 2KY
There wouldn't be a syntax error associated with that..
pawn Код:
#define EMB_COL_WHITE "{FFFFFF}"
It works perfectly fine.
|
Yes.. i have already this.. but give me a two errors syntax... in the format line... help me ?
Re: [HELP]OnPlayerText Problem. -
2KY - 08.05.2012
pawn Код:
format(str, sizeof(str), ""#EMB_COL_RED"%s["#EMB_COL_WHITE"M"#EMB_COL_RED"]""#EMB_COL_WHITE": %s", _Name, text[0]);
SendClientMessageToAll(-1, str);
SetPlayerColor(playerid, COL_BLUE);
Try that and see if it eliminates an error.