PDA

View Full Version : Starfinder Ruleset Item_Header Error



DividedDeath
July 14th, 2022, 00:20
Summary: Starfinder generating errors when opening items

Ruleset(s): Starfinder

Extensions/Themes: N/A

Modules Loaded: Core rules, and Alien Archives. Also with custom made items with nothing loaded

Operating System / Language Setting: Win 10 - America

Steps to Reproduce: Start starfinder campaign, open items list, click item.

We have also found exactly where the error lives.

There is no 'end' statement after the 13th line. (sTitle = sType;)

SFRPG\campaign\record_item.xml

<windowclass name="item_header" merge="join">
<margins control="0,0,0,2" />
<script>
function update()
super.update();
updateTypeLabel();
end
function updateTypeLabel()
local nodeRecord = getDatabaseNode();
local sTitle = DB.getValue(nodeRecord, "type", "");
if sTitle ~= "" then
local sSubtype = DB.getValue(nodeRecord, "subtype", "");
if sSubtype ~= "" then
sTitle = string.format("%s (%s)", sType, sSubtype);
else
sTitle = sType;
else
sTitle = LibraryData.getSingleDisplayText("item");
end
recordtype.setValue(sTitle);
end
</script>
<sheetdata>
<label_recordtype name="recordtype" />
</sheetdata>
</windowclass>

Moon Wizard
July 14th, 2022, 00:45
Thanks for reporting, and sleuthing the fix location. I've pushed a hot fix. Please run a Check for Updates, and try again.

Regards,
JPG

DividedDeath
July 14th, 2022, 00:51
Now I am getting another error :( it took me and a friend 2 hours with our super mediocre skills to find that one.

Seems to be in a similar location.

[7/13/2022 7:48:54 PM] [ERROR] Script execution error: [string "item_header"]:12: bad argument #2 to 'format' (string expected, got nil)

For the record. the program seems to work, it just pops up the console every time you click on an item.

Moon Wizard
July 14th, 2022, 02:19
Apologies. Trying to move too fast across multiple products, and not doing enough testing. I've pushed another hot fix update.

Regards,
JPG

DividedDeath
July 14th, 2022, 02:25
Any chance just for our curiosity (I am a sysadmin and my friend is learning some coding) you can tell us generally where the issue was?

Moon Wizard
July 14th, 2022, 03:20
As part of this overall update to the rulesets, I generalized a lot of scripts and templates so that they could be re-used across all rulesets, instead of having to be defined in every ruleset. So, a lot of the built-in rulesets were upgraded to use these common scripts/templates whenever possible; but retain their unique code as well. The code for the item header had some unique bits that had some problems with the integration.

Regards,
JPG