Crazybait24 Posted January 11, 2015 Share Posted January 11, 2015 Ok when ever I start my mod and have a friend join me and they make my item it crashes them... I asked if he would host and then i make the item and it crashes me... But when I'm playing on me own I'm able to craft the items and use them no problem.... Here's the crash log:Reset() returningAttempting to send resume requestReceiveResumeRequestDeleteUserSession session/0790001DF54B2DA8/KU_hIeTRq3xMovement prediction enabled Deserialize local session session/0790001DF54B2DA8/KU_hIeTRq3xFailed to load minimap from session data: session/0790001DF54B2DA8/KU_hIeTRq3x_minimap[string "scripts/components/inventoryitem.lua"]:10: attempt to index field 'inventoryitem' (a nil value)LUA ERROR stack traceback:scripts/components/inventoryitem.lua:10 in (field) ? (Lua) <9-11> self = inst = 101601 - (valid:true) _ = table: 320350A0 owner = nilscripts/class.lua:30 in () ? (Lua) <23-32> t = table: 32035050 k = owner v = nil p = table: 3202E020 old = nilscripts/components/inventoryitem.lua:24 in (field) _ctor (Lua) <21-40> self = inst = 101601 - (valid:true) _ = table: 320350A0 inst = 101601 - (valid:true)scripts/class.lua:181 in (local) cmp (Lua) <171-184> class_tbl = table: 32034588 arg = nil obj = table: 32035050scripts/entityscript.lua:505 in (method) AddComponent (Lua) <496-514> self (valid:true) = GUID = 101601 Transform = Transform (32026990) inlimbo = false persists = true actionreplica = table: 2A7A6550 event_listening = table: 3202E318 event_listeners = table: 3202E278 actioncomponents = table: 2A7A5B78 Physics = Physics (320291D0) spawntime = 73.166670482606 Network = Network (3201CA50) entity = Entity (27CE2A28) AnimState = AnimState (320277F0) components = table: 2A7A6320 replica = table: 2A7A6348 name = inventoryitem cmp = table: 32034588../mods/workshop-370989778/scripts/prefabs/willowleafblade.lua:41 in (field) fn (Lua) <21-54> inst = 101601 - (valid:true)scripts/mainfunctions.lua:147 in () ? (Lua) <136-167> name = willowleafblade prefab = Prefab willowleafblade - SCRIPT ERROR! Showing error screen RakNet detected a missing replica (29913)RakNet detected a missing replica (32770)RakNet detected a missing replica (13060)RakNet detected a missing replica (31904)RakNet detected a missing replica (22648)RakNet detected a missing replica (160574)RakNet detected a missing replica (160275)RakNet detected a missing replica (56)RakNet detected a missing replica (19868)RakNet detected a missing replica (257618)RakNet detected a missing replica (171094)RakNet detected a missing replica (17314)RakNet detected a missing replica (176)RakNet detected a missing replica (172916)RakNet detected a missing replica (40005)RakNet detected a missing replica (27725)RakNet detected a missing replica (165888)RakNet detected a missing replica (114001)RakNet detected a missing replica (177351)RakNet detected a missing replica (130856)RakNet detected a missing replica (166721)RakNet detected a missing replica (250743)RakNet detected a missing replica (232)RakNet detected a missing replica (5376)RakNet detected a missing replica (65596)RakNet detected a missing replica (196672)RakNet detected a missing replica (32831)RakNet detected a missing replica (66048)RakNet detected a missing replica (91886)RakNet detected a missing replica (109209)RakNet detected a missing replica (248)RakNet detected a missing replica (27648)RakNet detected a missing replica (65768)RakNet detected a missing replica (65904)RakNet detected a missing replica (24640)RakNet detected a missing replica (190720)RakNet detected a missing replica (71368)RakNet detected a missing replica (32)RakNet detected a missing replica (235473)RakNet detected a missing replica (75661)RakNet detected a missing replica (8290)RakNet detected a missing replica (2049)RakNet detected a missing replica (8194)RakNet detected a missing replica (141328)RakNet detected a missing replica (116)RakNet detected a missing replica (65636)RakNet detected a missing replica (9801)RakNet detected a missing replica (184222)RakNet detected a missing replica (90706)RakNet detected a missing replica (129516)RakNet detected a missing replica (141094)RakNet detected a missing replica (38351)RakNet detected a missing replica (232215)RakNet detected a missing replica (245314)RakNet detected a missing replica (145717)RakNet detected a missing replica (106577)RakNet detected a missing replica (190496)RakNet detected a missing replica (252912)RakNet detected a missing replica (259166)RakNet detected a missing replica (31183)RakNet detected a missing replica (40023)RakNet detected a missing replica (186331)RakNet detected a missing replica (36084)RakNet detected a missing replica (143431)RakNet detected a missing replica (232466)RakNet detected a missing replica (156823)RakNet detected a missing replica (259310)RakNet detected a missing replica (123546)RakNet detected a missing replica (10496)RakNet detected a missing replica (65289)RakNet detected a missing replica (122798)RakNet detected a missing replica (143060)RakNet detected a missing replica (8960)RakNet detected a missing replica (164992)RakNet detected a missing replica (53003)RakNet detected a missing replica (30814)RakNet detected a missing replica (127077)RakNet detected a missing replica (72450)RakNet detected a missing replica (49965)RakNet detected a missing replica (181973)RakNet detected a missing replica (6330)RakNet detected a missing replica (237731)RakNet detected a missing replica (14918)RakNet detected a missing replica (132745)RakNet detected a missing replica (225288)RakNet detected a missing replica (26651)RakNet detected a missing replica (164591)RakNet detected a missing replica (262137)and my file for the weapon is:local assets = { Asset("ANIM", "anim/willowleafblade.zip"), Asset("ANIM", "anim/swap_willowleafblade.zip"), Asset("IMAGE", "images/inventoryimages/willowleafblade.tex"), Asset("ATLAS", "images/inventoryimages/willowleafblade.xml"),}local function onequip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_willowleafblade", "swap_nightmaresword") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal")endlocal function onunequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal") endlocal function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("nightmaresword") inst.AnimState:SetBuild("willowleafblade") inst.AnimState:PlayAnimation("idle") inst:AddTag("sharp") inst:AddComponent("weapon") inst.components.weapon:SetDamage(TUNING.SPEAR_DAMAGE * 0.8) inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.atlasname = "images/inventoryimages/willowleafblade.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( onequip ) inst.components.equippable:SetOnUnequip( onunequip ) inst:AddComponent("finiteuses") inst.components.finiteuses:SetMaxUses(TUNING.SPEAR_USES * 0.5) inst.components.finiteuses:SetUses(TUNING.SPEAR_USES * 0.5) inst.components.finiteuses:SetOnFinished(inst.Remove) return instendreturn Prefab("common/inventory/willowleafblade", fn, assets) Link to comment Share on other sites More sharing options...
rezecib Posted January 11, 2015 Share Posted January 11, 2015 inst:AddTag("sharp") After this, add the following (which you should've found looking at any of the game's prefabs...):if not TheWorld.ismastersim then return inst endinst.entity:SetPristine() Link to comment Share on other sites More sharing options...
Crazybait24 Posted January 11, 2015 Author Share Posted January 11, 2015 Face to the palm.... I remember using that in all of the other prefabs >.< 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