Jump to content

Error in server.Lua, please help me!


Recommended Posts

I have a chat giving an error in an outputChatBox, I don't know what that is. Please help me!

ERROR: [BRR]Chat\AirNew_S.Lua:42: attempt to concatenate a boolean value

addEventHandler("onPlayerChat", root, function(tresc, msgtype)
if (msgtype == 0) then
  cancelEvent()
  local x,y,z = getElementPosition(source)
  for key, gracze in ipairs(getElementsByType("player")) do
    local x2,y2,z2 = getElementPosition(gracze)

    if ( getDistanceBetweenPoints3D ( x, y, z, x2, y2, z2 ) < DistanciaDoChatLocal ) then
      local int = getElementInterior   ( source )
      local dim = getElementDimension  ( source )
      local int2 = getElementInterior  ( gracze )
      local dim2 = getElementDimension ( gracze )
      if ( int == int2 and dim == dim2 ) then

        conta = getAccountName ( getPlayerAccount ( source ) )

        if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then
          outputChatBox("#ffffff[#FFFF00ʙʀʀ|ʟᴏᴄᴀʟ#ffffff] #FF7F50 ● Fundador ● #ffffff "..getPlayerName(source).. " #FFFFFF["..getPlayerID(source).."]:  #EEDD82"..tresc, gracze, 255, 255, 255, true)

        elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "SuperModerator" ) ) then
          outputChatBox("#ffffff[#FFFF00ʙʀʀ|ʟᴏᴄᴀʟ#ffffff] #B452CD● Coordenador ● #ffffff "..getPlayerName(source).. " #FFFFFF["..getPlayerID(source).."]:  #EEDD82"..tresc, gracze, 255, 255, 255, true)

        elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Staff" ) ) then
          outputChatBox("#ffffff[#FFFF00ʙʀʀ|ʟᴏᴄᴀʟ#ffffff] #FF8C00● Staff ● #FFFFFF "..getPlayerName(source).." #FFFFFF["..getPlayerID(source).."]:  #EEDD82"..tresc, gracze, 255, 255, 255, true)

        elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Revolution" ) ) then
          outputChatBox("#ffffff[#FFFF00ʙʀʀ|ʟᴏᴄᴀʟ#ffffff] #40E0D0● Revolution ● #FFFFFF "..getPlayerName(source).." #FFFFFF["..getPlayerID(source).."]:  #ffffff"..tresc, gracze, 255, 255, 255, true)

        elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Omega" ) ) then
          outputChatBox("#ffffff[#FFFF00ʙʀʀ|ʟᴏᴄᴀʟ#ffffff] #00FFFF● Omega ● #FFFFFF "..getPlayerName(source).." #FFFFFF["..getPlayerID(source).."]:  #ffffff"..tresc, gracze, 255, 255, 255, true)

        elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Sigma" ) ) then
          outputChatBox("#ffffff[#FFFF00ʙʀʀ|ʟᴏᴄᴀʟ#ffffff] #48D1CC● Sigma ● #FFFFFF "..getPlayerName(source).." #FFFFFF["..getPlayerID(source).."]:  #ffffff"..tresc, gracze, 255, 255, 255, true)

        elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Epsylon" ) ) then
          outputChatBox("#ffffff[#FFFF00ʙʀʀ|ʟᴏᴄᴀʟ#ffffff] #ADD8E60● Epsylon ● #FFFFFF "..getPlayerName(source).." #FFFFFF["..getPlayerID(source).."]:  #ffffff"..tresc, gracze, 255, 255, 255, true)

        elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Alpha" ) ) then
          outputChatBox("#ffffff[#FFFF00ʙʀʀ|ʟᴏᴄᴀʟ#ffffff] #EEDD82● Alpha ● #FFFFFF "..getPlayerName(source).." #FFFFFF["..getPlayerID(source).."]:  #ffffff"..tresc, gracze, 255, 255, 255, true)

        elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then
          outputChatBox("#ffffff[#FFFF00ʙʀʀ|ʟᴏᴄᴀʟ#ffffff] #00FF00● Cidadão ● #FFFFFF "..getPlayerName(source).." #FFFFFF["..getPlayerID(source).."]:  #ffffff"..tresc, gracze, 255, 255, 255, true)

        end
      end
    end
  end
end
end)

 

Edited by Patrick
code block and formating
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...