Jump to content

Recommended Posts

Okay, so i am making this paintable rock prefab for my custom character but it makes my game crash...

Maybe someone can help?

 

I have a couple of files:

 

This is the lua file of the prefab:

local assets={	Asset("ANIM", "anim/wrok.zip"),    Asset("ATLAS", "images/inventoryimages/wrok.xml")}local function fn(Sim)	local inst = CreateEntity()	inst.entity:AddTransform()	inst.entity:AddAnimState()            inst:AddComponent("inventoryitem")    inst.components.inventoryitem.atlasname = "images/inventoryimages/wrok.xml"    inst.AnimState:SetBank("pigskin")    inst.AnimState:SetBuild("wrok")    inst.AnimState:PlayAnimation("idle")    MakeInventoryPhysics(inst)        inst:AddComponent("stackable")	inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM    inst:AddComponent("inspectable")    	MakeSmallBurnable(inst)    MakeSmallPropagator(inst)    	inst:AddComponent("tradable")    	inst.components.tradable.goldvalue = TUNING.GOLD_VALUES.MEAT	    inst:AddComponent("inventoryitem")        inst:AddComponent("edible")    inst.components.edible.foodtype = "HORRIBLE"        return instendreturn Prefab( "common/inventory/wrok", fn, assets)  

 

Also, this is the modmain:

 

PrefabFiles = {	"drok",    "wrok",}Assets = {    Asset( "IMAGE", "images/saveslot_portraits/drok.tex" ),    Asset( "ATLAS", "images/saveslot_portraits/drok.xml" ),    Asset( "IMAGE", "images/selectscreen_portraits/drok.tex" ),    Asset( "ATLAS", "images/selectscreen_portraits/drok.xml" ),    Asset( "IMAGE", "images/selectscreen_portraits/drok_silho.tex" ),    Asset( "ATLAS", "images/selectscreen_portraits/drok_silho.xml" ),    Asset( "IMAGE", "bigportraits/drok.tex" ),    Asset( "ATLAS", "bigportraits/drok.xml" ),	Asset("IMAGE", "minimap/drok.tex"),    Asset("ATLAS", "minimap/drok.xml"), 	Asset("SOUNDPACKAGE", "sound/drok.fev"),    Asset("SOUND", "sound/drok.fsb"),}RemapSoundEvent( "dontstarve/characters/drok/death_voice", "drok/sound/death_voice" )RemapSoundEvent( "dontstarve/characters/drok/hurt", "drok/sound/hurt" )RemapSoundEvent( "dontstarve/characters/drok/talk_LP", "drok/sound/talk_LP" )AddMinimapAtlas("minimap/drok.xml")[MORE CODE] 

 

I'm not sure what is causing the crash hope someone can help!

Okay, so i am making this paintable rock prefab for my custom character but it makes my game crash...

Maybe someone can help?

 

I have a couple of files:

 

I'm not sure what is causing the crash hope someone can help!

 

Check your Log files ..

(...\MyDocuments\Klei\DoNotStarve\Log.txt )

It should show where (which line item) caused the error

If you still can't find the error, post your log file.

okay, i'm not sure what this means...

 

 

scripts/mods.lua(221,1) Disabling Drok because it had an error.

scripts/frontend.lua(723,1) SCRIPT ERROR! Showing error screen
scripts/mods.lua(270,1) Mod: Drok  Registering prefab file: prefabs/wrok
scripts/mods.lua(274,1) Mod: Drok    wrok
scripts/mods.lua(287,1) Mod: Drok  Registering default mod prefab

 

edit: do you want me to post the WHOLE file?

Edited by QuickShot010

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...