STAR TREK 2d20
Page 2 of 3 First 123 Last
  1. #11
    sure here's the db file.

    I'm not sure what steps you want using the story template I posted above press generate. It works or it doesn't re_generate until it does work.
    When it fails it comes up with a blank generation and the error pops up in the console with a line 1 of whatever file it is because it doesn't say but a different place in the line each time with numbers that are bigger than any code I would use.

    G
    Attached Files Attached Files
    Last edited by Garethpr; April 18th, 2023 at 13:04.

  2. #12
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,638
    Blog Entries
    1
    Im pretty sure its because Table [Name Middle] doesnt have a 317 entry
    However there is likely to be a few more errors littered thru that large number of tables/entries.
    You might also find that limiting tables to 100 entries will give you better performance

  3. #13
    Ok i've checked and amended that thanks - but that doesn't explain why it fails so often. 40% of the time it lands on 1 choice of 332. Not very likely. I did however see somthing in Name where it looks like there is -- but in fact that is an empty space instead of "-" so i've fixed that too. Also the same error occuirs using the other name table (Christian) which is different. line 1 - position 825 and 930 and in my other campaig having fixed the same errors there line 1 704 and 891.

  4. #14
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,638
    Blog Entries
    1
    Yes I suspect there are other issues. Unfortunately I cant see a way to get any clues for the issues without running every table dozens of times until an error occurs. Fix and repeat. You may have to try and add some debug into the Templates code which maybe non trivial to access and understand.

  5. #15
    So also fixed the no 317 in name begin. Now I'm getting this error.
    [ERROR] FormattedText SetValue XML Error: ')' is an unexpected token. The expected token is ';'. Line 1, position 704. the error still happening across both campaigns and both types of name generation.

  6. #16
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,638
    Blog Entries
    1
    Try making a simple template that only uses [Name] and test it out. If it still errors there are still more errors in the name tables. Roll the tables directly until you get an error. Tedious. That is quite an amazing setup you have put together.

  7. #17
    That is what I have been doing and the error is still this line 1 of what code I can't go look at it because it doesn't tell me where to look. Line 1 of db.xml doesn't have more than 38 positions. Also the same error occurs when using the "Christain" name generator and that is different tables with whole words rather than random syllabuls.

    You see here attached the "Name" alone isn't causing the error.

    G
    Attached Images Attached Images

  8. #18

    Random name only test

    Here's the other test. Same result.

    G
    Attached Images Attached Images

  9. #19
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,291
    The error is being caused when the code tries to set the value of the formatted text control (the control that displays the text in the story entry) using the formatted text contrl setValue API command: https://fantasygroundsunity.atlassia...ntrol#setValue

    The API command checks that the value being set is correct XML - in the case of these errors, the code is encountering invalid XML in the data. At this point it's just in a LIUA variable, so the only way to access it is by putting debug code in the FG ruleset in order to try to track down what the error is being caused by.

    XML has some requirements for markup - and the error is being caused because something in the generated text is breaking the XML markup. This will be because reserved characters are being used within the text - see this page for the list of reserved characters: https://learn.microsoft.com/en-us/vi...s?view=vs-2022

    Avoid using these characters in the table data that are used in the story templates.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  10. #20
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,291
    Continuing my previous post - I put some debug in a test CoreRPG ruleset - some errors were caused by the names of some linked records - like those with an ampersand in the name; for example: the "Note pad & stylus" item entry in one of the tables.

    Because this is being inserted as a link, with the name embedded in the resulting XML, the & in the name causes the XML to break.

    Ideally the FG code should do some replacements - but the problem is that by the time the final XML has been generated, there could well be a bunch of valid XML that has correctly escaped characters using the code that being with & - so the replacement code would have to be written so as not to replace valid XML escape characters, or other code replacements that use &... As this appears to be an issue that doesn't come up that much (or, at least, isn't reported much) that may not happen for a while. So you'll be stuck with having to properly escape the data - or don't use the reserved characters.
    Last edited by Trenloe; April 18th, 2023 at 17:33.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in