Witam. Zacząłem bawić się ots'mi. Sciągnęłem pierwszy lepszy silnik i go odpaliłem. Gdy chciałem użyć czaru (exevo gran mas frigo/vis/tera/flam) po tym yskoczył błąd w konsoli.
data/spells/scripts/attack/eternal winter.lua
Nie mam pojęcia jak to naprawić. Może brakuje jakieś funkcji w lib/source?
[21:50:39.423] [Error - Spell Interface]
[21:50:39.423] data/spells/scripts/attack/eternal winter.luanCastSpell
[21:50:39.424] Description:
[21:50:39.425] data/spells/scripts/attack/eternal winter.lua:38: attempt to inde
x global 'compConfig' (a nil value)
[21:50:39.425] stack traceback:
[21:50:39.425] data/spells/scripts/attack/eternal winter.lua:38: in function <d
ata/spells/scripts/attack/eternal winter.lua:19>
data/spells/scripts/attack/eternal winter.lua
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO)
function onGetFormulaValues(cid, level, maglevel)
local min = level * 2 + maglevel * 5
local max = level * 3 + maglevel * 6
return -min, -max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
local area = createCombatArea(AREA_CROSS5X5)
setCombatArea(combat, area)
local castleStorage, ctfStorage, dtbStorage, rushStorage = '11101', '11201', '11301', '11401'
function onCastSpell(cid, var)
domodlib('castle_config')
domodlib('DTB_config')
domodlib('CTF_config')
domodlib('config_rush_event')
domodlib('competition_config')
if getCreatureStorage(cid, castleCfg.storage.playersEvent) == 1 then
if exhaustion.check(cid, castleStorage) ~= false then
return false, doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You are exhausted.'), doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end
elseif (getCreatureStorage(cid, dtbConfig.blue.storage) == 1) or (getCreatureStorage(cid, dtbConfig.red.storage) == 1) then
if exhaustion.check(cid, ctfStorage) ~= false then
return false, doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You are exhausted.'), doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end
elseif (getCreatureStorage(cid, ctfConfig.blue.storage) == 1) or (getCreatureStorage(cid, ctfConfig.red.storage) == 1) then
if exhaustion.check(cid, dtbStorage) ~= false then
return false, doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You are exhausted.'), doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end
elseif tostring(getCreatureStorage(cid, compConfig.fighter)) == 'true' then
return false, doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You can\'t use this spell on Guild Competition War.'), doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
elseif tostring(getCreatureStorage(cid, configRushEvent.storages.player)) ~= '' then
if exhaustion.check(cid, rushStorage) ~= false then
return false, doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You are exhausted.'), doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end
end
return doCombat(cid, combat, var), exhaustion.set(cid, castleStorage, 300), exhaustion.set(cid, ctfStorage, 20), exhaustion.set(cid, dtbStorage, 20), exhaustion.set(cid, rushStorage, 20)
end
Nie mam pojęcia jak to naprawić. Może brakuje jakieś funkcji w lib/source?