Mackswell Posted December 21, 2017 Share Posted December 21, 2017 I create Dark Souls Characters mod and pot items DS to DST, but in DST it not work and i don't know why Sacredoath item work in DS log: Spoiler [string "../mods/test-cleric/scripts/prefabs/sacredo..."]:64: attempt to index local 'fx' (a nil value) LUA ERROR stack traceback: ../mods/test-cleric/scripts/prefabs/sacredoath.lua:64 in (field) onheard (Lua) <51-89> scripts/components/instrument.lua:25 in () ? (Lua) <16-30> code of item: Spoiler local function buffAll(who, doer, inst) --Увеличение атаки 10-15%, реген 1 хп в сек, резист к нег аурам 30% local buffexpire = 240 local range = 30 local pos = Vector3(doer.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, range) for k,v in pairs(ents) do if v:HasTag("player") and v.components.health and not v.components.health:IsDead() then print (v) --Если впервые используем, то бафаем, иначе удаляем таск и создаем заново if not v.task then --Накладываем баф local fx = SpawnPrefab("glow") 64--> fx.entity:SetParent(v.entity) fx.Transform:SetPosition(0, 0.1, 0) fx.Transform:SetScale(0.75, 0.75, 0.75) buffAttack(v, true) buffHpReg(v, true) buffNegAuraRes(v, true) else v.task:Cancel() v.task=nil end v.components.talker:Say("My power is over nine thousand!") v.task = v:DoTaskInTime(buffexpire, function() -- Убираем баф if (fx) then fx.dissapear(fx) end buffAttack(v, false) buffHpReg(v, false) buffNegAuraRes(v, false) v.task:Cancel() v.task=nil end) end end return true end sacredoath.lua server_log.txt Link to comment https://forums.kleientertainment.com/forums/topic/85674-port-ds-mod-to-dst-and-item-is-not-work/ Share on other sites More sharing options...
K1NGT1GER609 Posted December 23, 2017 Share Posted December 23, 2017 I can't remember where exactly it is but fx is actually reserved thus your calling something else in game, so try renaming fx to something else more...english just to avoid running to another reserved variable. Link to comment https://forums.kleientertainment.com/forums/topic/85674-port-ds-mod-to-dst-and-item-is-not-work/#findComment-986882 Share on other sites More sharing options...
Mackswell Posted December 23, 2017 Author Share Posted December 23, 2017 It work, thanks) Link to comment https://forums.kleientertainment.com/forums/topic/85674-port-ds-mod-to-dst-and-item-is-not-work/#findComment-986938 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