Jump to content

Recommended Posts

I am currently working on my character Gojo, recently I want to add a food type called "Curse" (that includes only nightmare fuels). I want to make Gojo can eat nightmare fuels by making his diet include the food type "Curse" also. I've looked for some tutorials making this but the server cannot open after I type the codings.
It shows something like this (without telling me where the error is)

Spoiler

unknown.png


I've checked by myself that the error mainly comes from this chunk
(since i removed this chunk and the character works normally)

I want to know where the problem is. Thank you so much for the help ! orz


 

Spoiler
-- New Food Type
AddPrefabPostInit("nightmarefuel"function(inst)
        if ThePlayer().prefab == "gojo" then
            inst.components.edible.foodtype = "CURSE"
            inst.components.edible.healthvalue = 10
            inst.components.edible.hungervalue = 0
            inst.components.edible.sanityvalue = 20
        end
    end)
 

modinfo.lua modmain.lua gojo.lua

Edited by Aurorance

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
×
  • Create New...