9kittencorn Posted July 15, 2017 Share 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 Link to comment https://forums.kleientertainment.com/forums/topic/80630-need-help-with-modding-my-own-character/ Share on other sites More sharing options...
ZupaleX Posted July 15, 2017 Share 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 Link to comment https://forums.kleientertainment.com/forums/topic/80630-need-help-with-modding-my-own-character/#findComment-939492 Share on other sites More sharing options...
9kittencorn Posted July 17, 2017 Author Share 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.. Link to comment https://forums.kleientertainment.com/forums/topic/80630-need-help-with-modding-my-own-character/#findComment-939838 Share on other sites More sharing options...
Lumina Posted July 17, 2017 Share Posted July 17, 2017 You can download character mod on the workshop and see how they work. Link to comment https://forums.kleientertainment.com/forums/topic/80630-need-help-with-modding-my-own-character/#findComment-939848 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