'm new to programming, I’m learning. The following error appears on my server:
There is no such getSharedObject export in the vRP_extended resource.
I think it’s something about the getSharedObject conversion
Could anyone help me fix this error? I will be posting the code.
SERVERCONFIG = {
DISCORDTOKEN = ""
}
function CreateUseableItem(itemName)
if Config.Framework == "new-qb" then
local QBCore = exports["qb-core"]:GetCoreObject()
QBCore.Functions.CreateUseableItem(itemName, function(source, item)
OpenMenu(source)
end)
elseif Config.Framework == "old-qb" then
local QBCore = nil
TriggerEvent('QBCore:GetObject', function(obj) QBCore = obj end)
QBCore.Functions.CreateUseableItem(itemName, function(source, item)
OpenMenu(source)
end)
elseif Config.Framework == "vRP" then
-- this is where the error is giving
local vRP = exports["vRP_extended"]:getSharedObject()
vRP.RegisterUsableItem(itemName, function(source)
OpenMenu(source)
end)
end
end
Citizen.CreateThread(function()
Citizen.Wait(1000)
if Config.Texts["openui"].item then
CreateUseableItem(Config.Texts["openui"].item)
end
end)
Would you help me?