Kiibie Posted November 19, 2017 Share Posted November 19, 2017 Helloooo, I once had a post asking help to change the sewing kit uses for my character mod and it did work! Although I noticed that if I choose my character mod and enable caves for my server, the game instantly crashes and gives me the following error; The character is totally playable when a server does not enable caves, and the programmed abilities also do work. As it seems to point out the modmain lua as the source of the problem, here's the coding he currently has in it; -- Sewing skills -- AddPrefabPostInit("sewing_kit", function(inst) inst.components.finiteuses:SetMaxUses( 2 * TUNING.SEWINGKIT_USES) inst.components.finiteuses:SetUses( 2 * TUNING.SEWINGKIT_USES) inst.components.sewing.repair_value = 2 * TUNING.SEWINGKIT_REPAIR_VALUE end) I do not understand why it crashes because of the caves, so I have no idea how to fix this ;_; Please any help would be amazing, thanks! Link to comment Share on other sites More sharing options...
CarlZalph Posted November 19, 2017 Share Posted November 19, 2017 AddPrefabPostInit( prefab, function(inst) -- Client and Server code here if not GLOBAL.TheWorld.ismastersim then return end -- Server code here end ) Components generally only exist on the server. There are replicated components and client-only components, yeah, but in this case your component only exists on the server. Link to comment Share on other sites More sharing options...
Kiibie Posted November 19, 2017 Author Share Posted November 19, 2017 (edited) @CarlZalph Ohhh, I expected it to be a client/server problem! Thanks a bunch, I tried and it worked fine ^w^ Edited November 19, 2017 by Kiibie It now works haha Link to comment 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