Menu

#3 JSoko 2.08 fails to extract letslogic's ids.

2.0
closed
Bug (1)
2023-11-11
2023-11-08
No

Let's Logic import seems to be broken in 2.08. Only the last level in a collection gets the id extracted correctly.

From the look at the code the main problem seems to be as follows:

A typical letslogic level comment goes like this:

ID: ...
Title: ...
Author: ...

The "Title" and "Author" lines are processed separately and not added to levelComment. So the "ID" line rests the only non-empty line there, and so it's treated as the title line for the next level.

Besides, the whole "for (index = levelComment.size(); --index >= 0;)" cycle in DataParser looks suspicious. If it's supposed to skip trailing lines, why doesn't it do just that, it would be 3 lines at most, not the entire page...

Discussion

  • Matthias Meger

    Matthias Meger - 2023-11-08
    • assigned_to: Matthias Meger
     
  • Matthias Meger

    Matthias Meger - 2023-11-08
    • labels: --> Bug
    • status: open --> accepted
     
  • Matthias Meger

    Matthias Meger - 2023-11-11

    Thanks for reporting that bug!

    It is fixed in the new version 2.09.
    In JSoko 2.09 the level id is extracted and stored in the level AND kept in the level comments, since with the comments it is also saved to disk/database.

    The " whole "for (index = levelComment.size(); --index >= 0;)" cycle in DataParser" is necessary to distinguish between level title and comment in situations like this:

    Level title 1

    #####
    #@$.#
    #####
    

    level title or comment?

    #######
    #@ $ .#
    #######
    
     

    Last edit: Matthias Meger 2023-11-11
  • Matthias Meger

    Matthias Meger - 2023-11-11
    • status: accepted --> closed
     

Log in to post a comment.