9kittencorn 0 Report post Posted July 15, 2017 I posted this already but in a wrong section. So i try it with the "modding"-section again :3 This time I will also upload my scripts not only the error."Here is the error-text :[string *scripts/mainfunctions.lua*]:119: Error loading file prefabs/Ren[string *../mods/Ren/scripts/prefabs/Ren.lua*]:62: function arguments expected near "="LUA ERROR strack traceback:=[C] in function 'assert'scripts/mainfunctions.lua(119.1)=(tail call) ?scripts/mods.lua(154.1)scripts/mods.lua(593.1) in function 'RegisterPrefabs'scripts/gamelogic.lua(226.1) in function 'LoadAssets' " Ren.lua hounded.lua modmain.lua Share this post Link to post Share on other sites
ZupaleX 270 Report post Posted July 15, 2017 Hi function MakePlayerCharacter(name, customprefabs, customassets, common_postinit, master_postinit, starting_inventory) You do return MakePlayerCharacter("Ren", prefabs, assets, fn) By passing your function as the 4th argument, you pass it as the common_postinit which is executed even on the client side. You should not add components in here, this belongs generally to the server side. The components you are trying to access do not exist at the time when the common_postinit is called, all the components are added later. Check out player_common.lua from line 1457 common_postinit is called line 1727 the components hunger, sanity, etc... you are trying to access in your function fn are added from line 1795. I think you have enough elements to fix it now Share this post Link to post Share on other sites
9kittencorn 0 Report post Posted July 17, 2017 Aaaah.. I don't get it... can you show me how it work on an example? I'm really sorry for being annoying but I am a totally noob.. Share this post Link to post Share on other sites
Lumina 2150 Report post Posted July 17, 2017 You can download character mod on the workshop and see how they work. Share this post Link to post Share on other sites