DeadlyFox Posted March 24, 2025 Share Posted March 24, 2025 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. Link to comment https://forums.kleientertainment.com/forums/topic/165031-need-help-i-tried-to-use-a-existing-animation-for-one-of-my-in-game-custom-items-but-the-game-keeps-crashing/ Share on other sites More sharing options...
-LukaS- Posted March 25, 2025 Share Posted March 25, 2025 Looks like you might have some syntax error on line 199 in your modmain.lua. Link to comment https://forums.kleientertainment.com/forums/topic/165031-need-help-i-tried-to-use-a-existing-animation-for-one-of-my-in-game-custom-items-but-the-game-keeps-crashing/#findComment-1809046 Share on other sites More sharing options...
DeadlyFox Posted March 26, 2025 Author Share Posted March 26, 2025 (edited) 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 March 26, 2025 by DeadlyFox Link to comment https://forums.kleientertainment.com/forums/topic/165031-need-help-i-tried-to-use-a-existing-animation-for-one-of-my-in-game-custom-items-but-the-game-keeps-crashing/#findComment-1809238 Share on other sites More sharing options...
-LukaS- Posted March 26, 2025 Share Posted March 26, 2025 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) Link to comment https://forums.kleientertainment.com/forums/topic/165031-need-help-i-tried-to-use-a-existing-animation-for-one-of-my-in-game-custom-items-but-the-game-keeps-crashing/#findComment-1809251 Share on other sites More sharing options...
DeadlyFox Posted March 26, 2025 Author Share Posted March 26, 2025 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? Link to comment https://forums.kleientertainment.com/forums/topic/165031-need-help-i-tried-to-use-a-existing-animation-for-one-of-my-in-game-custom-items-but-the-game-keeps-crashing/#findComment-1809261 Share on other sites More sharing options...
-LukaS- Posted March 26, 2025 Share Posted March 26, 2025 You can send me the file through discord, my username is lukas_t_ 1 Link to comment https://forums.kleientertainment.com/forums/topic/165031-need-help-i-tried-to-use-a-existing-animation-for-one-of-my-in-game-custom-items-but-the-game-keeps-crashing/#findComment-1809265 Share on other sites More sharing options...
DeadlyFox Posted March 26, 2025 Author Share Posted March 26, 2025 Okay, and thanks a lot! Link to comment https://forums.kleientertainment.com/forums/topic/165031-need-help-i-tried-to-use-a-existing-animation-for-one-of-my-in-game-custom-items-but-the-game-keeps-crashing/#findComment-1809272 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now