12.03.2010, 18:44
i am trying to script a chat just like team chat but for colors (means if blue typed ![text] only other blues can see it) i have made a code but it has error , i will really appreciate if u guys can help me
errors :
all of those are line : 213 which is :
Код:
public OnPlayerText(playerid, text[]) { new string[256]; if (text[0] == '!') { new name[24]; GetPlayerName(playerid, name, 24); format(string, 256, "[Color] %s : %s", name,text[1]); for (new a = 0; a < 20; a++) { if (IsPlayerConnected(a)) { if (GetPlayerColor[a] == GetPlayerColor[playerid]) SendClientMessage(a, orange, string); } } return 0; } return 1; }
Код:
error 028: invalid subscript (not an array or too many subscripts): "GetPlayerColor"
Код:
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
Код:
if (GetPlayerColor[a] == GetPlayerColor[playerid]) SendClientMessage(a, orange, string);