• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X Capture The Flag [0.3.7] Console Error.

Otlandserv

Member
Joined
May 22, 2023
Messages
58
Reaction score
5
Hello.
I have problem with Capture The Flags MOD.
This is console error:


Lua:
[12:20:46.636] [Error - MoveEvents Interface]
[12:20:46.636]                  domodlib('CTF_config')
[12:20:46.636]                  domodlib('CTF_lib')

[12:20:46.636]                  function onStepIn(cid, item, position, fromPosit          ion, toPosition, lastPosition, actor)
[12:20:46.636]                          if isPlayer(cid) then
[12:20:46.636]                                  if getCreatureStorage(cid, ctfCo          nfig.flag.storage) > 0 then
[12:20:46.636]                                          if getCreatureStorage(ci          d, ctfConfig.red.storage) > 0 then
[12:20:46.636]                                                  if isControledBy          TeamCTF(getThingPos(cid), 'red') then
[12:20:46.636]                                                          local po          ints = ctfConfig.pointsForFlag + (ctfConfig.pointsForEachBase * getBasesControle          dByTeamCTF('red'))

[12:20:46.637]                                                          if getSt          orage(ctfConfig.red.scores) + points >= ctfConfig.maxTeamPoints then
[12:20:46.637]                                                                 -          - Close event --
[12:20:46.637]                                                                 d          oCloseCtfEvent('red')
[12:20:46.637]                                                                 d          oChangeSpeed(cid, math.floor(getCreatureBaseSpeed(cid) / 2))
[12:20:46.637]                                                          else
[12:20:46.637]                                                                 d          oChangeSpeed(cid, math.floor(getCreatureBaseSpeed(cid) / 2))
[12:20:46.637]                                                                 d          oRemoveCondition(cid, CONDITION_OUTFIT)
[12:20:46.637]
[12:20:46.637]                                                                 l          ocal conditionRed = createConditionObject(CONDITION_OUTFIT)
[12:20:46.637]                                                                 s          etConditionParam(conditionRed, CONDITION_PARAM_TICKS, -1)
[12:20:46.637]                                                                 a          ddOutfitCondition(conditionRed, {lookType = 130, lookHead = 94, lookBody = 94, l          ookLegs = 94, lookFeet = 94})
[12:20:46.637]                                                                 d          oAddCondition(cid, conditionRed)
[12:20:46.638]
[12:20:46.638]                                                                 d          oSetStorage(ctfConfig.red.scores, getStorage(ctfConfig.red.scores) + points)
[12:20:46.638]                                                                 d          oBroadcastMessage('[CTF]\n' .. getCreatureName(cid) .. ' from [red team] has sup          plied flag to the base. Actual results:\nRed team: ' .. getStorage(ctfConfig.red          .scores) .. '/' .. ctfConfig.maxTeamPoints .. '\nBlue team: ' .. getStorage(ctfC          onfig.blue.scores) .. '/' .. ctfConfig.maxTeamPoints .. '', MESSAGE_STATUS_WARNI          NG)
[12:20:46.638]                                                          end

[12:20:46.638]                                                          addEvent          (doCreateItem, 15000, ctfConfig.flag.id, 1, ctfConfig.flag.pos)
[12:20:46.638]                                                          doCreatu          reSetStorage(cid, ctfConfig.flag.storage, -1)
[12:20:46.638]                                                  else
[12:20:46.638]                                                          doPlayer          SendCancel(cid, 'This base isn\'t controlled by your team.')
[12:20:46.638]                                                  end
[12:20:46.638]                                          elseif getCreatureStorag          e(cid, ctfConfig.blue.storage) > 0 then
[12:20:46.638]                                                  if isControledBy          TeamCTF(getThingPos(cid), 'blue') then
[12:20:46.638]                                                          local po          ints = ctfConfig.pointsForFlag + ctfConfig.pointsForEachBase * getBasesControled          ByTeamCTF('blue')

[12:20:46.638]                                                          if getSt          orage(ctfConfig.blue.scores) + points >= ctfConfig.maxTeamPoints then
[12:20:46.638]                                                                 -          - Close event --
[12:20:46.638]                                                                 d          oCloseCtfEvent('blue')
[12:20:46.638]                                                                 d          oChangeSpeed(cid, math.floor(getCreatureBaseSpeed(cid) / 2))
[12:20:46.638]                                                          else
[12:20:46.638]                                                                 d          oChangeSpeed(cid, math.floor(getCreatureBaseSpeed(cid) / 2))
[12:20:46.639]                                                                 d          oRemoveCondition(cid, CONDITION_OUTFIT)
[12:20:46.639]
[12:20:46.639]                                                                 l          ocal conditionBlue = createConditionObject(CONDITION_OUTFIT)
[12:20:46.639]                                                                 s          etConditionParam(conditionBlue, CONDITION_PARAM_TICKS, -1)
[12:20:46.639]                                                                 a          ddOutfitCondition(conditionBlue, {lookType = 130, lookHead = 87, lookBody = 87,           lookLegs = 87, lookFeet = 87})
[12:20:46.639]                                                                 d          oAddCondition(cid, conditionBlue)
[12:20:46.639]
[12:20:46.639]                                                                 d          oSetStorage(ctfConfig.blue.scores, getStorage(ctfConfig.blue.scores) + points)
[12:20:46.639]                                                                 d          oBroadcastMessage('[CTF]\n' .. getCreatureName(cid) .. ' from [blue team] has su          pplied flag to the base. Actual results:\nRed team: ' .. getStorage(ctfConfig.re          d.scores) .. '/' .. ctfConfig.maxTeamPoints .. '\nBlue team: ' .. getStorage(ctf          Config.blue.scores) .. '/' .. ctfConfig.maxTeamPoints .. '', MESSAGE_STATUS_WARN          ING)
[12:20:46.639]                                                          end

[12:20:46.639]                                                          addEvent          (doCreateItem, 15000, ctfConfig.flag.id, 1, ctfConfig.flag.pos)
[12:20:46.639]                                                          doCreatu          reSetStorage(cid, ctfConfig.flag.storage, -1)
[12:20:46.639]                                                  else
[12:20:46.639]                                                          doPlayer          SendCancel(cid, 'This base isn\'t controlled by your team.')
[12:20:46.639]                                                  end
[12:20:46.639]                                          end
[12:20:46.639]                                  end
[12:20:46.639]                          end
[12:20:46.640]                          return true
[12:20:46.640]                  end
[12:20:46.640]          :onStepIn
[12:20:46.640] Description:
[12:20:46.640] (luaAddOutfitCondition) Condition not found
> Broadcasted message: "[CTF]
Maly Czarodziej from [red team] has supplied flag to the base. Actual results:
Red team: 600/1000
Blue team: 0/1000".

[12:21:07.500] [Error - Action Interface]
[12:21:07.500]                  domodlib('CTF_config')
[12:21:07.501]                  domodlib('CTF_lib')

[12:21:07.501]                  function onUse(cid, item, fromPosition, itemEx,           toPosition)
[12:21:07.501]                          doRemoveItem(itemEx.uid)
[12:21:07.501]                          doCreatureSetStorage(cid, ctfConfig.flag          .storage, 1)
[12:21:07.501]                          doRemoveCondition(cid, CONDITION_OUTFIT)
[12:21:07.501]
[12:21:07.501]
[12:21:07.501]                          local conditionFlagRed = createCondition          Object(CONDITION_OUTFIT)
[12:21:07.501]                                  setConditionParam(conditionFlagR          ed, CONDITION_PARAM_TICKS, -1)
[12:21:07.501]                                  addOutfitCondition(conditionFlag          Red, {lookType = 335, lookHead = 94, lookBody = 94, lookLegs = 79, lookFeet = 79          , lookAddons = 3})
[12:21:07.501]
[12:21:07.501]                          local conditionFlagBlue = createConditio          nObject(CONDITION_OUTFIT)
[12:21:07.501]                                  setConditionParam(conditionFlagB          lue, CONDITION_PARAM_TICKS, -1)
[12:21:07.501]                                  addOutfitCondition(conditionFlag          Blue, {lookType = 335, lookHead = 87, lookBody = 87, lookLegs = 79, lookFeet = 7          9, lookAddons = 3})
[12:21:07.502]
[12:21:07.502]
[12:21:07.502]                          doAddCondition(cid, (getCreatureStorage(          cid, ctfConfig.blue.storage) == 1 and conditionFlagBlue or conditionFlagRed))
[12:21:07.502]                          doChangeSpeed(cid, -(math.floor(getCreat          ureBaseSpeed(cid) / 2)))

[12:21:07.502]                          doBroadcastMessage('[CTF]\n' .. getCreat          ureName(cid) .. ' from [' .. (getCreatureStorage(cid, ctfConfig.blue.storage) ==           1 and 'blue' or 'red') .. ' team] has taken the flag. Let\'s capture this flag!          ', MESSAGE_STATUS_WARNING)
[12:21:07.502]                          return true
[12:21:07.502]                  end
[12:21:07.502]          :onUse
[12:21:07.502] Description:
[12:21:07.502] (luaAddOutfitCondition) Condition not found
 
Solution
Try this?

I moved all the outfit conditions outside of the functions.
(Because I'm pretty sure they need to be loaded at server start-up?)
Try this?

I moved all the outfit conditions outside of the functions.
(Because I'm pretty sure they need to be loaded at server start-up?)
 

Attachments

Solution
Back
Top