johnsamir
Advanced OT User
Hello i use tfs 1.4 version 8.6
i have the following error
this is the script:
I've updated my server from 1.3 and maybe i have missing code in c++ or something else, can somebody point me out the solucion please?
solved simply excluded that files by commenting it out with this sign # or symbol
i have the following error
Code:
Lua Script Error: [Scripts Interface]
C:\Users\felip\Documents\GitHub\pro-ot\data\scripts\quests\load_quests_xml.lua:callback
...ts\GitHub\pro-ot\data\scripts\quests\load_quests_xml.lua:13: attempt to call method 'children' (a nil value)
stack traceback:
...ts\GitHub\pro-ot\data\scripts\quests\load_quests_xml.lua:13: in function <...ts\GitHub\pro-ot\data\scripts\quests\load_quests_xml.lua:4>
>> Loaded all modules, server starting up...
Lua:
-- If you don't intend to use quests.xml, you can delete this file.
local xmlQuest = GlobalEvent("Load XML Quests")
function xmlQuest.onStartup() Line 4
local questDoc = XMLDocument("data/XML/quests.xml")
if not questDoc then
io.write(
"[Warning - GlobalEvent::onStartup] Could not load quests.xml.\n")
return true
end
local quests = questDoc:child("quests")
for questNode in quests:children() do LINE 13
local missions = {}
for missionNode in questNode:children() do
local mission = {
name = missionNode:attribute("name") or "",
storageId = tonumber(missionNode:attribute("storageid")),
startValue = tonumber(missionNode:attribute("startvalue")),
endValue = tonumber(missionNode:attribute("endvalue")),
ignoreEndValue = tobool(missionNode:attribute("ignoreendvalue")),
description = missionNode:attribute("description")
}
if not mission.description then
local description = {}
for missionState in missionNode:children() do
description[tonumber(missionState:attribute("id"))] =
missionState:attribute("description") or ""
end
mission.description = description
end
missions[#missions + 1] = mission
end
Game.createQuest(questNode:attribute("name"), {
storageId = tonumber(questNode:attribute("startstorageid")),
storageValue = tonumber(questNode:attribute("startstoragevalue")),
missions = missions
}):register()
end
return true
end
xmlQuest:register()
Post automatically merged:
solved simply excluded that files by commenting it out with this sign # or symbol
Last edited: