Callum1243 Posted July 6, 2016 Share Posted July 6, 2016 I get: [2016-07-06 23:02:36] SCRIPT ERROR: addon_tag\server.lua:32: 'end' expected (to close 'if' at line 21) near ''[2016-07-06 23:02:36] ERROR: Loading script failed: addon_tag\server.lua:32: 'end' expected (to close 'if' at line 21) near '' For: --============================================================================================================================ function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ) local name = getPlayerName(thePlayer) --============================================================================================================================ -- Mute if isPlayerMuted ( thePlayer ) then outputChatBox ("You are muted!", thePlayer, 255, 128, 22, true) return end --============================================================================================================================ -- Chat - Prefix outputChatBox("#FFFFFF[#FF0000Survivor#FFFFFF] #0000FF"..name..": #DEFF00"..message, getRootElement(), 255, 255, 255, true) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("Admin")) then outputChatBox("[#4F4F4FMTA#FF0000DayZ#FFFFFF][#FF0000ADMINISTRATOR] #FF6B00" .. getPlayerName(playersource) .. ": #F3FF00" .. msg, getRootElement(), 60, 200, 40, true) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("Console")) then outputChatBox("#FFFFFF[#4F4F4FMTA#FF0000DayZ#FFFFFF][#FF0000O Server Owner#FFFFFF] #0000ff" .. getPlayerName(playersource) .. ": #F3FF00" .. msg, getRootElement(), 60, 200, 40, true) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("Dev")) then outputChatBox("#FFFFFF[#4F4F4FMTA#FF0000DayZ#FFFFFF][#FF0000 Server Developer#FFFFFF] #0000ff" .. getPlayerName(playersource) .. ": #F3FF00" .. msg, getRootElement(), 60, 200, 40, true) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("VIP")) then outputChatBox("#FFFFFF[#4F4F4FMTA#FF0000DayZ#FFFFFF][#7a7666VIP PLAYER#FFFFFF] #009b76" .. getPlayerName(playersource) .. ": #F3FF00" .. msg, getRootElement(), 60, 200, 40, true) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("Moderator")) then outputChatBox("#FFFFFF[#4F4F4FMTA#FF0000DayZ#FFFFFF][#686c5eMODERATOR#FFFFFF] #4b0082" .. getPlayerName(playersource) .. ": #F3FF00" .. msg, getRootElement(), 60, 200, 40, true) --============================================================================================================================ -- Log Console outputServerLog("[CHAT]"..getPlayerName(thePlayer)..": "..message) --============================================================================================================================ end addCommandHandler("GlobalChat", globalMessage) Line 21: if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("VIP")) then Link to comment
Captain Cody Posted July 6, 2016 Share Posted July 6, 2016 --============================================================================================================================ function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ) local name = getPlayerName(thePlayer) --============================================================================================================================ -- Mute if isPlayerMuted ( thePlayer ) then outputChatBox ("You are muted!", thePlayer, 255, 128, 22, true) return end --============================================================================================================================ -- Chat - Prefix outputChatBox("#FFFFFF[#FF0000Survivor#FFFFFF] #0000FF"..name..": #DEFF00"..message, getRootElement(), 255, 255, 255, true) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("Admin")) then outputChatBox("[#4F4F4FMTA#FF0000DayZ#FFFFFF][#FF0000ADMINISTRATOR] #FF6B00" .. getPlayerName(playersource) .. ": #F3FF00" .. msg, getRootElement(), 60, 200, 40, true) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("Console")) then outputChatBox("#FFFFFF[#4F4F4FMTA#FF0000DayZ#FFFFFF][#FF0000O Server Owner#FFFFFF] #0000ff" .. getPlayerName(playersource) .. ": #F3FF00" .. msg, getRootElement(), 60, 200, 40, true) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("Dev")) then outputChatBox("#FFFFFF[#4F4F4FMTA#FF0000DayZ#FFFFFF][#FF0000 Server Developer#FFFFFF] #0000ff" .. getPlayerName(playersource) .. ": #F3FF00" .. msg, getRootElement(), 60, 200, 40, true) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("VIP")) then outputChatBox("#FFFFFF[#4F4F4FMTA#FF0000DayZ#FFFFFF][#7a7666VIP PLAYER#FFFFFF] #009b76" .. getPlayerName(playersource) .. ": #F3FF00" .. msg, getRootElement(), 60, 200, 40, true) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(playersource)), aclGetGroup("Moderator")) then outputChatBox("#FFFFFF[#4F4F4FMTA#FF0000DayZ#FFFFFF][#686c5eMODERATOR#FFFFFF] #4b0082" .. getPlayerName(playersource) .. ": #F3FF00" .. msg, getRootElement(), 60, 200, 40, true) --============================================================================================================================ -- Log Console outputServerLog("[CHAT]"..getPlayerName(thePlayer)..": "..message) --============================================================================================================================ end end addCommandHandler("GlobalChat", globalMessage) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now