Jump to content

Vehicle library(restart shops)


Edi

Recommended Posts

[14:08:21] WARNING: vehicle-manager/vehicle-library/s_vehicle_library.lua:15: Access denied @ 'restartResource'
[14:08:21] ERROR: logs/s_logs.lua:105: call: failed to call 'mysql:lazyQuery' [string "?"]
 
This is the error I receive.
Link to comment

here is error from logs/s_logs.lua

    local r = getRealTime()
    
    local timeString = ("%04d-%02d-%02d %02d:%02d:%02d"):format(r.year+1900, r.month + 1, r.monthday, r.hour,r.minute, r.second)
    exports.mysql:lazyQuery("INSERT INTO `logtable` VALUES ('"..timeString.."', '".. exports.mysql:escape_string(actionStr) .."', '".. exports.mysql:escape_string(sourceStr).."', '".. exports.mysql:escape_string(affectedStr).."', '".. exports.mysql:escape_string(data).."')")
    return true
end

here is error from vehicle-manager/vehicle-library/s_vehicle_library.lua

function refreshCarShop()
    local theResource = getResourceFromName("carshop-system")
    if theResource then
        local hiddenAdmin = getElementData(client, "hiddenadmin")
        if getResourceState(theResource) == "running" then
            restartResource(theResource)
            outputChatBox("Carshops were restarted.", client, 0, 255, 0)
            if hiddenAdmin == 0 then
                exports.global:sendMessageToAdmins("[VEHICLE MANAGER]" .. getPlayerName(client) .. " restarted the carshops.")
            else
                exports.global:sendMessageToAdmins("[VEHICLE MANAGER] A hidden admin restarted the carshops.")
            end

 

Link to comment

Hi, acces denied error means you have to give ACL rights to the resource open ACL.xml, add <object name="resource.vehicle-manager"></object> in Admin ACL group (or use Admin resource to do it).

Second error is about exported function of "mysql" resource not being recognized. Does this resource exist on your server ?

Edited by Mkl
  • Like 1
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...