• 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!

NPC Marriage system 8.6+ [Fixed]

"Players have a special buffs as a wedding gift given by the union. This bonus is only given if the married players are nearby"

What buff the character gains ?
 
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
 
Last edited:
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

Some 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.
 
Some 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.
i'm using tfs 0.4 0.3.6
this is what i got when i talk to him after saying hi and than marriage

Code:
[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>

can anyone please help me with this error
Code:
[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 using tfs 0.4 0.3.6
 
Last edited by a moderator:
TFS 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.
 
TFS 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.
i'm looked it up and i use 0.3.6 but how do i add
Code:
db.executeQuery
i just put it in 050-function.lua file somewhere?
 
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).
 
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).

hmm.. so you mean i dont have to add db.executeQuery anywhere? and remove db.executeQuery from 100-compat.lua?

but i got only one in compat.lua cuz i adding it there
 
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
 
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
I am slow to take...
so i have adding
Code:
db.query = db.executeQuery
into my 100-compat.lua like this
Code:
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
that's all i need if yes it's doesnt work? and i dont have anything with word query in my 050-function.lua either ...
 
You 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
 
You 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
mmm... i found that
Code:
db.executeQuery
is using in marriagesystem.lua and marriagesysmtem.xml so i just gonna replace that with
Code:
db.executeQuery = db.query
that's what you mean right ...
 
Last edited:
Remove all
Code:
db.executeQuery = db.query
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.
 
Remove all
Code:
db.executeQuery = db.query
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.
so i remove all
Code:
db.executeQuery = db.query

and replace it with
Code:
db.executeQuery = db.query

in following files marriagesystem.xml, marriagesystem.lua, and i add it to 100-compat.lua
and now it's should work right?
 
I have just got this error in my console anyone can help? Please
Code:
>> 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.
 
Last edited:
Duplicate means it's added twice, so make sure it's only added 1x.
 
Back
Top