Thread: DB.getValue
-
January 6th, 2021, 05:06 #1
DB.getValue
[EDIT - ignore title, someone moved posts around - the title refers to a previously posted and solved thread which still exists with same name below... ]
The following is from MoreCore:manager_char_mc.lua
Code:function addClassLevel(nodeChar, sClass, sRecord, nLevel) local nodeSource = resolveRefNode(sRecord); Debug.console("nodeChar: ", nodeChar); Debug.console("sClass: ", sClass); Debug.console("sRecord: ", sRecord); local nLevel = DB.getValue(nodeChar, "pcclasslevel", "number"); ...
If I read it right (rusty and wasn't ever a pro), it probably should be:
local nLevel = DB.getValue(nodeChar, "pcclasslevel", 0);Last edited by Varsuuk; January 6th, 2021 at 05:40.
-
January 6th, 2021, 12:54 #2
-
January 6th, 2021, 22:28 #3
In this case, it isn't likely to be able to cause a problem since, if I recall, pcclasslevel is a control and therefore already exists so the "default" part of that will never trigger.
This was just me noticing the mismatch and commenting for an "as-u-go" fix if I was correct.
Damned - what's best way to report anything if see something? Discord message, post here in Workshop, or post in OtherRulesets/MoreCore? (I was going to post in the last one but thought since was code maybe here?)
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks