Foxrai Posted February 6, 2015 Share Posted February 6, 2015 (edited) 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 Edited February 6, 2015 by Foxrai Link to comment Share on other sites More sharing options...
DrSmugleaf Posted February 6, 2015 Share Posted February 6, 2015 return Prefab("common/inventory/orbstaff", fn, assetsMissed a parenthesis, should be:return Prefab("common/inventory/orbstaff", fn, assets)Not quite as bad as me missing capitals 5 times in the same day! Link to comment Share on other sites More sharing options...
Foxrai Posted February 6, 2015 Author Share Posted February 6, 2015 return Prefab("common/inventory/orbstaff", fn, assetsMissed a parenthesis, should be:return Prefab("common/inventory/orbstaff", fn, assets)Not quite as bad as me missing capitals 5 times in the same day! head + desk!! Link to comment Share on other sites More sharing options...
Kzisor Posted February 6, 2015 Share Posted February 6, 2015 head + desk!! I posted in the Don't Starve thread but will post here. You're missing the following code:inst.entity:AddNetwork() if not TheWorld.ismastersim then return inst end Link to comment Share on other sites More sharing options...
Foxrai Posted February 6, 2015 Author Share Posted February 6, 2015 I posted in the Don't Starve thread but will post here. You're missing the following code:inst.entity:AddNetwork() if not TheWorld.ismastersim then return inst end hehe and thank you here as well It's my bad tho ... should delete whle thread from here o.o posted that in DST by mistake... 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