Jump to content

Recommended Posts

Hi, i have a (probably) simple problem.  Whenever i activate my mod, which simply adds the Glommer's sanity aura to the Catcoon, i get a error, either '(' expected near "local", or, once i try to fix it, <name> or '...'

expected near local. This is my code: 

   
local function cute   local self = inst:AddComponent("sanityaura")    inst.components.sanityaura.aurafn = CalcSanityAura	AddPrefabPostInit('catcoon', cute)

 

Edited by StretchVanb

Incorrect syntax.

local function CalcSanityAura(inst, observer)    return GLOBAL.TUNING.SANITYAURA_TINYendlocal function cute(inst)	inst:AddComponent("sanityaura")	inst.components.sanityaura.aurafn = CalcSanityAuraendAddPrefabPostInit("catcoon", cute)

 

Incorrect syntax.

local function CalcSanityAura(inst, observer)    return GLOBAL.TUNING.SANITYAURA_TINYendlocal function cute(inst)	inst:AddComponent("sanityaura")	inst.components.sanityaura.aurafn = CalcSanityAuraendAddPrefabPostInit("catcoon", cute)

Thank you so much! This is my first mod, and i am grateful for you showing me what i did wrong. 

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...