View Issue Details

IDProjectCategoryView StatusLast Update
0012669Dwarf FortressTechnical -- Generalpublic2024-01-26 12:49
ReporterDPh-Kraken Assigned To 
PrioritylowSeveritytrivialReproducibilityalways
Status newResolutionopen 
Product Version50.11 
Summary0012669: BP_RELATION errorlog treats comments as additional token
DescriptionThe token BP_RELATION (in b_detail_plan files) uses six arguments:
[BP_RELATION:by:id:relation:by:id:amount]

If not all of those are filled in, the errorlog should throw the error "BP_RELATION needs 6 tokens" whenever the file loads.
However, if the user adds a line with only 5 tokens, no ending colon, and a comment at the end,
[BP_RELATION:by:id:relation:by:id] "any text"
the error log does not throw an error for that line. It is unknown if that line loads properly, but the additional information demonstrates how the error log parses it.
Steps To ReproduceAdd the following code to any b_detail_plan file and then load the game.

[BODY_DETAIL_PLAN:TEST_ERRORLOG]
    [BP_RELATION:BY_TOKEN:]
    [BP_RELATION:BY_TOKEN:ERRORLOG2A]
    [BP_RELATION:BY_TOKEN:ERRORLOG3A:AROUND]
    [BP_RELATION:BY_TOKEN:ERRORLOG4A:AROUND:BY_TOKEN]
    [BP_RELATION:BY_TOKEN:ERRORLOG5A:AROUND:BY_TOKEN:UB]
    
    [BP_RELATION:BY_TOKEN:] colon + comment
    [BP_RELATION:BY_TOKEN:ERRORLOG2B:] colon + comment
    [BP_RELATION:BY_TOKEN:ERRORLOG3B:AROUND:] colon + comment
    [BP_RELATION:BY_TOKEN:ERRORLOG4B:AROUND:BY_TOKEN:] colon + comment
    [BP_RELATION:BY_TOKEN:ERRORLOG5B:AROUND:BY_TOKEN:UB:] colon + comment
    
    [BP_RELATION:BY_TOKEN] comment
    [BP_RELATION:BY_TOKEN:ERRORLOG2C] comment
    [BP_RELATION:BY_TOKEN:ERRORLOG3C:AROUND] comment
    [BP_RELATION:BY_TOKEN:ERRORLOG4C:AROUND:BY_TOKEN] comment
    
    [BP_RELATION:BY_TOKEN:NOERRORLOG5B:AROUND:BY_TOKEN:UB] comment
    [BP_RELATION:BY_TOKEN:NOERRORLOG6:AROUND:BY_TOKEN:UB:100]
Additional InformationErrors given by steps to reproduce code:

TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:::::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG2A::::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG3A:AROUND:::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG4A:AROUND:BY_TOKEN::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG5A:AROUND:BY_TOKEN:UB:
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:::::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG2B::::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG3B:AROUND:::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG4B:AROUND:BY_TOKEN::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG5B:AROUND:BY_TOKEN:UB:
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN: comment::::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG2C: comment:::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG3C:AROUND: comment::
TEST_ERRORLOG: BP_RELATION needs 6 tokens: BY_TOKEN:ERRORLOG4C:AROUND:BY_TOKEN: comment:
Tagsmod, raw files

Activities

There are no notes attached to this issue.

Add Note

Note

Issue History

Date Modified Username Field Change
2024-01-26 12:49 DPh-Kraken New Issue
2024-01-26 12:49 DPh-Kraken Tag Attached: mod
2024-01-26 12:49 DPh-Kraken Tag Attached: raw files