Jump to content

Custom character sleeping error


Recommended Posts

I have a custom character that has special sleep properties, and they work fine when played as the host of a server.

 

However, when I join a server running the mod as a client, and I try to craft one of the sleep items (in this case, the bed roll), I get the following error:

modmain line 38: attempt to index field 'sleepingbag' (a nil value)

The code in modmain is as follows (it's functionally identical for each item)

 

VbRcBsE.png

 

Does anyone know where I might be able to fix it? My friend thinks that adding a global tag to the "inst.components.sleepingbag.onsleep" might fix it, but we both think asking here would be a good idea before doing anything.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...