02.06.2013, 01:40
So, here's my staff chat problem. What I just added a developer system to the script, so there can be devs in it. I want them to be able to use and read the /sc (staff chat) but when I add them to the command, it gives me these errors -
Here is the command
Line 4682 which is giving me the errors
Код:
C:\Users\Justin\Desktop\SA-MP Server - Scripts\.Main.Red Chaos.Main\gamemodes\RedRB.pwn(4682) : error 029: invalid expression, assumed zero C:\Users\Justin\Desktop\SA-MP Server - Scripts\.Main.Red Chaos.Main\gamemodes\RedRB.pwn(4682) : error 001: expected token: ";", but found ")" C:\Users\Justin\Desktop\SA-MP Server - Scripts\.Main.Red Chaos.Main\gamemodes\RedRB.pwn(4682) : error 029: invalid expression, assumed zero C:\Users\Justin\Desktop\SA-MP Server - Scripts\.Main.Red Chaos.Main\gamemodes\RedRB.pwn(4682) : fatal error 107: too many error messages on one line
Код:
CMD:sc(playerid, params[]) { new string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(!PlayerInfo[playerid][pHelper] && !PlayerInfo[playerid][pAdmin]) || !PlayerInfo[playerid][pDev]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sc [text]"); if(AntiAdv(playerid, params)) return 1; if(PlayerInfo[playerid][pHelper] > PlayerInfo[playerid][pAdmin]) format(string, sizeof(string), "*%s %s: {FFFFFF}%s", RPHLN(playerid), RPN(playerid), params); if(PlayerInfo[playerid][pDev] > PlayerInfo[playerid][pDev]) format(string, sizeof(string), "*%s %s: {FFFFFF}%s", RPDLN(playerid), RPN(playerid), params); else if(PlayerInfo[playerid][pAdmin] > PlayerInfo[playerid][pHelper])format(string, sizeof(string), "*%s %s: {FFFFFF}%s", RPALN(playerid), RPN(playerid), params); foreach(Player, i) { if(IsPlayerLoggedIn(i)) { if(PlayerInfo[i][pHelper] || PlayerInfo[i][pAdmin] || PlayerInfo[i][pDev]) { SendClientMessage(i, COLOR_PURPLE, string); } } } // Logs if(PlayerInfo[playerid][pHelper] && !PlayerInfo[playerid][pAdmin]) format(string, sizeof(string), "*%s %s: %s", RPHLN(playerid), RPN(playerid), params); if(PlayerInfo[playerid][pDev] > PlayerInfo[playerid][pDev]) format(string, sizeof(string), "*%s %s: {FFFFFF}%s", RPDLN(playerid), RPN(playerid), params); else if(!PlayerInfo[playerid][pHelper] && PlayerInfo[playerid][pAdmin])format(string, sizeof(string), "*%s %s: %s", RPALN(playerid), RPN(playerid), params); Log("logs/helperchat.log", string); return 1; }
Код:
if(!PlayerInfo[playerid][pHelper] && !PlayerInfo[playerid][pAdmin]) || !PlayerInfo[playerid][pDev]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");