Jaber Posted April 2, 2016 Share Posted April 2, 2016 Hi , i have a problem : ERROR: roleplay-chat/s_chat.lua:875: attempt to concatenate a boolean value the ligne 875 outputChatBox(" [AdminChat] " .. exports['roleplay-accounts']:getAdminRank(player) .. " " .. exports['roleplay-accounts']:getRealPlayerName(player) .. " (" .. exports['roleplay-accounts']:getAccountName(player) .. "): " .. message, v, 90, 230, 90, false) and the buged func : function getAdminRank(element) if (not tonumber(element)) then if (not element) or (getElementType(element) ~= "player") then return end if (not tonumber(getElementData(element, "roleplay:accounts.admin_level"))) then return false, 1 end local elementData = tonumber(getElementData(element, "roleplay:accounts.admin_level")) if (elementData == 0) then return "Player" elseif (elementData == 1) then return "Trial Admin" elseif (elementData == 2) then return "Administrator", "Admin" elseif (elementData == 3) then return "Lead Administrator", "Lead Admin" elseif (elementData == 4) then return "Head Administrator", "Head Admin" elseif (elementData == 5) then return "Community Leader", "Leader" elseif (elementData == 6) then return "Community Owner", "Owner" else return false, "Unknown" end else local element = tonumber(element) if (element == 0) then return "Player" elseif (element == 1) then return "Trial Administrator", "Trial Admin" elseif (element == 2) then return "Administrator", "Admin" elseif (element == 3) then return "Lead Administrator", "Lead Admin" elseif (element == 4) then return "Head Administrator", "Head Admin" elseif (element == 5) then return "Community Leader", "Leader" elseif (element == 6) then return "Community Owner", "Owner" else return false, "Unknown" end end end Link to comment
Noki Posted April 3, 2016 Share Posted April 3, 2016 exports['roleplay-accounts']:getAdminRank(player) exports['roleplay-accounts']:getRealPlayerName(player) exports['roleplay-accounts']:getAccountName(player) Any one of these functions returns a boolean (true or false). From what you've provided, I will assume everything else is fine but getAdminRank returns false. Which means the player in question does not have an admin level. 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