Change db.executeQuery to db.query or add this in compat.lua/global.lua.
Code:db.executeQuery = db.query
Hey @Limos can you explain this little more i dont really understand this one...
i already add db.executeQuery = db.query to my compat.lua, but the issue still there.
and how do i change db.executequery to db.query? i use UniformservZ
i'm using tfs 0.4 0.3.6Some of the older revs have different names for the function that executes database queries. The line Limos posted fixes any problems you might have because of the renaming of the function.
I dont know what version of TFS you are using but you must add that line to your libs or to the global file and then restart the server for the changes to take effect. Post the version of TFS you are using.
[11/02/2015 09:24:38] data/npc/scripts/marriagesystem.lua:17: attempt to call global 'isMarried' (a nil value)
[11/02/2015 09:24:38] stack traceback:
[11/02/2015 09:24:38] data/npc/scripts/marriagesystem.lua:17: in function 'callback'
[11/02/2015 09:24:38] data/npc/lib/npcsystem/npchandler.lua:390: in function 'onCreatureSay'
[11/02/2015 09:24:38] data/npc/scripts/marriagesystem.lua:8: in function <data/npc/scripts/marriagesystem.lua:8>
[11/02/2015 09:24:38] data/npc/scripts/marriagesystem.lua:17: attempt to call global 'isMarried' (a nil value)
[11/02/2015 09:24:38] stack traceback:
[11/02/2015 09:24:38] data/npc/scripts/marriagesystem.lua:17: in function 'callback'
[11/02/2015 09:24:38] data/npc/lib/npcsystem/npchandler.lua:390: in function 'onCreatureSay'
[11/02/2015 09:24:38] data/npc/scripts/marriagesystem.lua:8: in function <data/npc/scripts/marriagesystem.lua:8>
i'm looked it up and i use 0.3.6 but how do i addTFS 0.3.6 and TFS 0.4 are 2 different versions. TFS 0.3.6 uses db.executeQuery, TFS 0.4 uses db.query.
Add the mod or add the functions in data/lib/050-function.lua, on the first post you find the functions like isMarried.
db.executeQuery
Yes, and don't add db.executeQuery, it's already added, so remove that line from 100-compat.lua (make sure all lines with db.executeQuery are removed from that file).
db.query = db.executeQuery
I am slow to take...The compat.lua is to set/rename functions from other servers to functions from your server.
TFS 0.3.6 uses db.executeQuery, if you have db.executeQuery = db.query in 100-compat.lua (or anywhere else) every time you use db.executeQuery in a script, it will become db.query which doesn't exist in TFS 0.3.6 so it's a nil value. This way if you use db.executeQuery it will also become a nil value since it's set/renamed to db.query.
You can also add this in 100-compat.lua.
Code:db.query = db.executeQuery
db.query = db.executeQuery
doAreaCombatDispel = doCombatAreaDispel
getItemDescriptionsById = getItemInfo
hasProperty = hasItemProperty
hasClient = hasPlayerClient
print = std.cout
getPosByDir = getPositionByDirection
db.updateQueryLimitOperator = db.updateLimiter
db.stringComparisonOperator = db.stringComparison
db.query = db.executeQuery
db.executeQuery = db.query
mmm... i found thatYou don't have to add anything, but if you add db.query = db.executeQuery you won't get nil value errors if db.query is uses somewhere, just make sure you don't have this anywhere.
Code:db.executeQuery = db.query
db.executeQuery
db.executeQuery = db.query
db.executeQuery = db.query
so i remove allRemove all
This sets db.executeQuery to db.query, db.query does not exist in TFS 0.3.6 so that will be a nil value, make sure db.executeQuery is used and not db.query.Code:db.executeQuery = db.query
db.executeQuery = db.query
db.executeQuery = db.query
>> Loading outfits
[Warning - Outfits::parseOutfitNode] Duplicated outfit for gender 0 with lookType 23
[Warning - Outfits::parseOutfitNode] Duplicated outfit for gender 1 with lookType 23
>> Loading raids
>> Loading chat channels
>> Loading script systems
>> Loading mods...
> Loading buypremium_command.xml... done.
> Loading customspells.xml... done.
> Loading highscorebook.xml... done.
> Loading MarriageSystem.xml~... done.
> Loading firstitems.xml... done.
> Loading MarriageSystem.xml...[Warning - ScriptManager::loadFromXml] Duplicated lib in mod marry_func, previously declared in MarriageSystem.xml~
[Warning - TalkAction::registerEvent] Duplicate registered talkaction with words: /marriage
[Warning - TalkAction::registerEvent] Duplicate registered talkaction with words: !marriage
done.