--Service
function TycoonPlacement.Client:DS2Placement(player)
local tycoonObjects = DataStore2("TycoonObjects",player)
return tycoonObjects:GetTable({})
end
That error means that TycoonPlacement is not a attribute of self.Services - it is hard to solve your issue without any more code from the controller.
Also, as its not your own work (I assume) its hard for me to provide a solution if you don’t understand the system yourself (and I have no knowledge on AeroGameFramework) - could you show me the code for the framework else you’ll have to try and get support from its creator (unless someone can provide a solution themselves as they’ve got experience).
Placed? It has to be in a function that is a part of the Controller’s table or else Aero Framework can’t give you access to the services table eg:
local MyController = {}
function MyController:Start()
--This should work
self.Services.TycoonPlacement:DS2Placement()
end
--This would error!
self.Services.TycoonPlacement:DS2Placement()
function CallFunc()
--This will still error when called because CallFunc is not a part of MyController
self.Services.TycoonPlacement:DS2Placement()
end
return MyController
I created a working example, let me know if anything is different here.
MyService:
local MyService = {Client = {}}
function MyService:Start()
end
function MyService:Init()
end
function MyService.Client:Test()
print("Called from Client!")
end
return MyService
MyController:
local MyController = {}
function MyController:Start()
self.Services.MyService:Test()
end
function MyController:Init()
end
return MyController