Jump to content

Recommended Posts

i am trying to add a in game animation to one of my custom items but it keeps giving me this error:

The following mod(s)  has caused a failure: Emily

[string "../mods/emily/modmain.lua"]:199: '<name>' expected near '"INVENTORY"'

For a bit of more context i used @-LukaS-'s tutorial from youtube: (https://www.youtube.com/watch?v=TWWhW3dpylk&list=PLkyp_TU4Mi4ziOhZR5JcAYx1ELypNpbAZ&index=5) so i could have a idea of how i should proceed for future items, but i dont know what i could have done wrong. If any one could help me i would very be thankful.

Could you please help me solve it? Because i cant tell what i am supposed to write to fix it

Here is the code that i wrote at line 199:

AddComponentAction(actiontype:"INVENTORY", component:"huggable", fn:function(inst, doer, actions, right)

Edited by DeadlyFox

Ah, I see the problem. In the video it looks like the line is written like this:

AddComponentAction(actiontype: "INVENTORY", component: "huggable", fn: function(inst, doer, actions, right)

but that's just Visual Studio Code adding parameter hints, the actual line should look like this:

AddComponentAction("INVENTORY", "huggable", function(inst, doer, actions, right)

 

Thanks, it doesn't crash anymore but now i cant craft the item anymore even if it shows up. Should i send you the lua files? or is there another way for you to see?

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