You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to implement multiple inheritance but when I chain more than 2 classes it is cause LOVE to crash with the following error:
Error: [love "boot.lua"]:48: Failed to initialize filesystem: already initialized
I am uncertain if is it a limitation a bug or am I doing something wrong.
This is what I am trying to do:
createClass = require "createClass"
Car = createClass()
function Car:constructor(_wheels)
self.wheels = _wheels
end
FamilyCar = createClass(Car)
function FamilyCar:constructor(_seats, _wheels)
self.super.constructor(self, _wheels)
self.seats = _seats
end
SportCar = createClass(FamilyCar)
function SportCar:constructor(_engine, _seats, _wheels)
self.super.constructor(self, _seats, _wheels)
self.engine = _engine
end
peugeot = FamilyCar(5, 4)
ferrari = SportCar("V8", 2, 4) --this is causing the crash
function love.draw()
love.graphics.print(peugeot.wheels)
end
Hi.
I am trying to implement multiple inheritance but when I chain more than 2 classes it is cause LOVE to crash with the following error:
Error: [love "boot.lua"]:48: Failed to initialize filesystem: already initialized
I am uncertain if is it a limitation a bug or am I doing something wrong.
This is what I am trying to do:
Here is a project that reproduce the problem:
multiple inheritance.zip
Using
LOVE 11.4
createClass.lua
macOS 12.3.1
I would appreciate any help.
Thank you.
The text was updated successfully, but these errors were encountered: