Search the Community
Showing results for tags 'eof'.
-
So the error code in log is: Error loading file prefabs/orbstaff...apps/common/dont_starve/data/../mods/wayrra/scripts/prefabs/orbstaff.lua:66: ')' expected near '<eof>'LUA ERROR stack traceback: so I take it - it's that I missed the bracket ) near end somewhere? Or didn't put and end somewhere... I'm just blind :/ CAN"T see that in code... local assets={ Asset("ANIM", "anim/orbstaff.zip"), Asset("ANIM", "anim/swap_orbstaff.zip"), Asset("ATLAS", "images/inventoryimages/orbstaff.xml"), Asset("IMAGE", "images/inventoryimages/orbstaff.tex"),}local prefabs ={ "lighterfire",} local function fn() local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_orbstaff", "swap_orbstaff") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") inst.fire = SpawnPrefab( "lighterfire" ) --inst.fire.Transform:SetScale(.125,.125,.125) local follower = inst.fire.entity:AddFollower() follower:FollowSymbol( owner.GUID, "swap_object", 35, -35, 1 ) end local function OnUnequip(inst, owner) inst.fire:Remove() inst.fire = nil owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal") end local inst = CreateEntity() local trans = inst.entity:AddTransform() local anim = inst.entity:AddAnimState() local sound = inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) anim:SetBank("orbstaff") anim:SetBuild("orbstaff") anim:PlayAnimation("idle") inst:AddComponent("inspectable") inst:AddTag("sharp") inst:AddComponent("weapon") inst.components.weapon:SetDamage(48) inst:AddComponent("characterspecific") inst.components.characterspecific:SetOwner("wayrra") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "orbstaff" inst.components.inventoryitem.atlasname = "images/inventoryimages/orbstaff.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) return instendreturn Prefab("common/inventory/orbstaff", fn, assets