I’ve done that already, I know what the message states, and when doing that the output doesn’t contain AddItem, which literally leads me to the same place. It was known it was nil, I wrote it in the OP. Anyways I want to know why it is nil.
Alright, my bad then. In this case we need to have a look at the definition.
Since the player.lua seem to work and you think items.lua is not imported correctly add a simple print somewhere in this file, just to make sure its printed.
Ok, never thought of that for some reason, did it and it is being imported, and in the way it’s supposed to. It prints what I wrote before base.lua is imported.
So the issue persists on something else, and I can’t figure out what.
Its loaded in this order with player beeing last and items first.
Both items and palyer.lua define a variable called ZMan and therefore override it. The last instance player.lua can use its functions correctly.
To fix this you need to define a global variable called ZMan und assign the functions and STUFF directly with
ZMan.player = {}
and so on.
I created a pull request for you which changes what I described here.
Alright, my bad pushing untested code. right above your screenshot there should be an parsing error related to the affected files. While changing the structure I missed to remove the commas (,) seperating the entries in your previours structure. I removed them and this time checked with running your code. Its working, however my database is missing some entries for items so I only see alot of errors. Anyway The PR is updated.