Jump to content

ERROR: interior-system/s_interior_admin.lua:943: exports: Call to non-running server resource (official-interiors) [string "?"]


Recommended Posts

Can somebody smarter than me help me find the problem? :/

Line 943            local interiors = exports["official-interiors"].getInteriorsList()
            interior = interiors[tonumber(interiorId)]
            if interior then
                local ix = interior[2]
                local iy = interior[3]
                local iz = interior[4]
                local optAngle = interior[5]
                local interiorw = interior[1]
                
                local rot = getPedRotation(thePlayer)
                local id = SmallestID()
                local query = mysql:query_free("INSERT INTO interiors SET creator='"..getElementData( thePlayer, "account:username" ).."', id=" .. id .. ",x='" .. x .. "', y='" .. y .."', z='" .. z .."', type='" .. inttype .. "', owner='" .. owner .. "', locked='" .. locked .. "', cost='" .. cost .. "', name='" .. mysql:escape_string( name) .. "', interior='" .. interiorw .. "', interiorx='" .. ix .. "', interiory='" .. iy .. "', interiorz='" .. iz .. "', dimensionwithin='" .. dimension .. "', interiorwithin='" .. interiorwithin .. "', angle='" .. optAngle .. "', angleexit='" .. rot .. "', createdDate=NOW()")
                
                if (query) then
                    if tonumber(inttype) == 1 then
                        mysql:query_free("INSERT INTO `interior_business` SET `intID`='"..id.."' ")
                    end
                    
                    outputChatBox("Created Interior with ID " .. id .. ".", thePlayer, 255, 194, 14)
                    exports.logs:dbLog(thePlayer, 4, { "in"..tostring(id) } , "ADDINTERIOR T:".. inttype .." I:"..interiorId.." C:"..cost)
                    reloadOneInterior(id, false, false)    
                    local adminUsername = getElementData(thePlayer, "account:username")
                    local hiddenAdmin = getElementData(thePlayer, "hiddenadmin")
                    local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
                
                    if hiddenAdmin == 0 then
                        exports.global:sendMessageToAdmins("[INTERIOR]: "..adminTitle.." ".. getPlayerName(thePlayer):gsub("_", " ").. " ("..adminUsername..") has created Interior #"..id.." with name '"..name.."', type "..inttype..", price: $"..cost..").")
                    else
                        exports.global:sendMessageToAdmins("[INTERIOR]: A hidden admin has created Interior #"..id.." with name '"..name.."', type "..inttype..", price: $"..cost..").")
                    end
                    
                    exports["interior-manager"]:addInteriorLogs(id, commandName.." - id "..interiorId.." - price $"..cost.." - name "..name, thePlayer)
                    
                    return true
                else
                    outputChatBox("Failed to create interior - Invalid characters used in name of the interior.", thePlayer, 255, 0, 0)
                end
            else
                outputChatBox("Failed to create interior - There is no such interior (" .. ( interiorID or "??" ) .. ").", thePlayer, 255, 0, 0)
            end
        end
    end
end

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...