Maris Posted December 29, 2014 Share Posted December 29, 2014 Screenshot: There was no crash for 2 days in this game session. I guess this code was used many many times. But then suddenly crashed. Link to comment Share on other sites More sharing options...
Silentdarkness1 Posted December 29, 2014 Share Posted December 29, 2014 It's a mod bug. You can tell because a part of the stack traceback reads: "../mods/RusMods/modmain.lua:308 in (field) fn (Lua) <281-314>" If the stack traceback has anything to do with something connected to the mods folder, it's a mod bug. Link to comment Share on other sites More sharing options...
Maris Posted December 29, 2014 Author Share Posted December 29, 2014 But it's strange. Mod does not do anything especial.Just:local rocks = SpawnPrefab("rocks")And then:rocks.components.stackable.stacksize = 2 --causing crash Link to comment Share on other sites More sharing options...
Maris Posted December 29, 2014 Author Share Posted December 29, 2014 (edited) Ahh I think I have understood... It's a mod bug. Thank You. This is correct code for my case: if not find_any_prefab(inst,"rocks",120) then local rocks = _G.SpawnPrefab("rocks") if rocks then rocks.components.stackable.stacksize = 2 inst.components.inventory:GiveItem(rocks) end end Edited December 29, 2014 by Maris 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