I was creating a code trying to implement SOLID principles to it, didn’t work so I ask our friend Mr.GPT to help a little, and it send me a code with this error
I dont know how to fix it because of two reasons, I dont know if it is a syntax error or it is a problem with the interface that it’s not initializing correctly, can someone help?
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/Characters }
Well I can scratch this off my list, but my fears where true and the interfaces are not correctly implemented , since it’s a abstract return and I’m trying to return a non-abstract, do you have any idea of what may be the error? I guess it has something to do with the interface returning void and the method returning vector, but it wasn’t easy as simply changing void to vector3. Well anyway, a lot to work on, thanks for the help
I would probably default to reading the documentation rather than trying to learn verse from Chat GPT as it doesn’t actually know the language.
Without training it yourself and knowing how to write Verse it’s going to lead you astray.
I haven’t quite gotten into using interfaces but I will point out that it seems as if you’re trying to redefine a lot of basic functions that you already have access to. It may make more sense for you to just create extensions of the preexisting methods.
You can make a file called util.verse and then write extensions there.
(Just need to put your Using api pointers up top)
This allows me to write MyProp.RotateInPlace(2.0,180.0) or spawn{MyProp.RotateInPlace(2.0,180.0)} depending on if the function im in has suspends tag.
Can also do this with other data types and have returns:
I didn’t write this one, it can be found in snippets on the left panel if u dig a bit, but you can do quite a bit and require t : type which makes it pretty flexible.
I totally wish I could help you with the interfaces, I just stopped at implementing abstract supers to instantiate my concrete children from. Interfaces were confusing
Just offering up the knowledge that I do have. Will watch this thread to see what I can learn about it though.
You helped a lot with you shared with us, thank you very much. I fell a little bad for not having anything to share in return since I’m quite new on programming, but I hope in the future when the interfaces make more sense to me to come back here and share with y’all.