PDA

View Full Version : Found Potential Bugs in CoreRPG Code



deer_buster
December 19th, 2023, 15:09
location
Issue


scripts\manager_char_encumbrance.lua
function getCurrencyUpdateFields(), reference to undefined _tDefaultCurrencyFields


scripts\manager_calendar.lua
function getDaysInMonth(nMonth), reference to undefined nYear


scripts\manager_actor_common.lua
function getSpaceReachCore(rActor), reference to undefined nDU


scripts\data_library.lua
aRecords["soundset"] setting value of nExportNoReadOnly twice


scripts\manager_characterlist.lua
function handleAFK(msgOOB), reference to undefined sUser in setUserState


scripts\manager_characterlist.lua
function getAllEntries(), returns undefined _tCharEntries


scripts\manager_color.lua
function resetUIGeneralButtonColors(), reference to undefined constant DEFAULT_COLOR_BUTTON_ICON


scripts\manager_export.lua
function unregisterPreExportCallback reference to undefined fn (should be fCallback?)


scripts\manager_image_deathmarker.lua
function getSetMap() reference to undefined s (should be sTint?)


scripts\manager_item.lua
function handleItemStringTransfer(msgOOB) reference to undefined sClass


scripts\manager_options.lua
function registerOption(sKey, bLocal, sGroup, sLabel, sOptionType, aCustom) reference to undefined default


scripts\manager_referencemanual.lua
function updateOrderValues(cList) reference to undefined kChildNodeRecord


scripts\manager_referencemanual.lua
function updateBlockImageControls(wBlock, bReadOnly) reference to undefined CaptionEmpty (should be bCaptionEmpty?)


scripts\manager_set.lua
function SetOperations:difference(vParam) reference to undefined set (should be vParam?)


scripts\manager_table.lua
function onTableRoll(rSource, rTarget, rRoll) reference to undefined sTable


scripts\manager_utility.lua
function resolveLinkedControl(c) reference to undefined linktarget


scripts\manager_utility.lua
function simplifyDecode(t, sKeyLimiter) reference to sKey outside of local scope value "tTemp[sKey] = v;"


scripts\manager_version.lua
function convertPartyItems4() reference to undefined vNode (should be vParcelItem?)

Moon Wizard
December 19th, 2023, 16:40
Probably left over variables from older or dev code. I’ll review.

What tool did you use to find those?

Regards,
JPG

deer_buster
December 19th, 2023, 16:56
Probably left over variables from older or dev code. I’ll review.

What tool did you use to find those?

Regards,
JPG

vscode with lua extension.

deer_buster
December 19th, 2023, 16:59
highlights files with potential issues59544

Moon Wizard
December 19th, 2023, 22:19
Updated these as part of the updates today. There was one false positive (scripts\manager_utility.lua - simplifyDecode)

Regards,
JPG

deer_buster
December 19th, 2023, 22:46
Updated these as part of the updates today. There was one false positive (scripts\manager_utility.lua - simplifyDecode)

Regards,
JPG
Seems like this one is still there...



scripts\manager_item.lua
function handleItemStringTransfer(msgOOB) reference to undefined sClass



function handleItemStringTransfer(msgOOB)
local nodeTargetRecord = DB.findNode(msgOOB.sTarget);
if not nodeTargetRecord then
return;
end
local sTargetList = ItemManager.getTargetInventoryListPath(nodeTargetR ecord, sClass);
if not sTargetList then
return;
end

local sItem = StringManager.trim(msgOOB.sName);
if sItem == "" or sItem == "-" then
return;
end

local nCount = tonumber(msgOOB.nCount) or 1;

ItemManager.addStringToList(DB.getPath(nodeTargetR ecord, sTargetList), sItem, nCount);
end

Moon Wizard
December 20th, 2023, 00:12
I'd had looked at downstream and cleaned up; but forgot to remove the original reference. I'll catch that in next cycle.

Regards,
JPG