Rinart73 Posted October 6, 2019 Share Posted October 6, 2019 Avorion: 0.26.1 Windows 10 x64 I get the following error: Error constructing Entity: Entities can only be created in context of a scene on line: local entity = Entity() My code: local data = {} --- other code function Buffs.secure() local entity = Entity() -- save energy and shield data.shield = entity.shieldDurability if entity:hasComponent(ComponentType.EnergySystem) then data.energy = EnergySystem(entity).energy else data.energy = nil end return data end Link to comment Share on other sites More sharing options...
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