STAR TREK 2d20

Thread: Crap need help.

  1. #1

    Join Date
    Feb 2009
    Location
    Jacksonville, Florida
    Posts
    153

    Crap need help.

    So I dusted off the ole'FG again and am playing, got a problem though. Whenever a character loads one of the pages on my ruleset, it causes some sort of issue with the db.xml and it will reset with a fresh db.xml next time I run the program

    It's a pretty elaborate page too... actually it's 10 elaborate windows with roughly 3200 lines on each one. The db.xml goes from 5kb to 76kb with a single character opening the pages.

    Is it because of my size or is there an error? I thought it was possibly because I used [] brackets in the dice descriptions but I changed them to () to no avail.

    Any help?
    "Tis better to die on your feet, then live on your knees."

  2. #2

    Join Date
    Feb 2009
    Location
    Jacksonville, Florida
    Posts
    153
    Also if it helps, here is a copy of one of those 10 pages.

    https://download345.mediafire.com/a3...pon_dagger.xml
    "Tis better to die on your feet, then live on your knees."

  3. #3

    Join Date
    Feb 2009
    Location
    Jacksonville, Florida
    Posts
    153
    Ok, found what causes the error but I have no idea why.

    The diescores (There are a lot of them) If I remove all of them, I no longer have db.xml corruption issues.

    What is wrong with this code?

    <!--Main Strike Dice-->
    <diescore name="Unarmed Strike [sm -1]">
    <anchored>
    <to>Unarmed</to>
    <position>insidetopleft</position>
    <offset>270,45</offset>
    <size>
    <width>40</width>
    <height>165</height>
    </size>
    </anchored>
    </diescore>

    <modbox name="Unarmed Strike [sm -1]Mod">
    <sourcename>Test</sourcename>
    <bounds>165,164,19,15</bounds>
    <description>
    <text>Unarmed Hitrate Modifier</text>
    </description>
    <script>
    function update()
    UnarmedProf = source.getValue()
    UnarmedMastery = source1.getValue()
    UnarmedGrandMastery = source2.getValue()
    UnarmedDexterity = source3.getValue()
    UnarmedProfBonusHit = source4.getValue()
    UnarmedMasteryBonusHit = source5.getValue()
    UnarmedGrandMasteryBonusHit = source6.getValue()
    BasicUnarmedBonus = (UnarmedGrandMasteryBonusHit + UnarmedMasteryBonusHit + UnarmedProfBonusHit)
    BasicUnarmedOverall = ((UnarmedDexterity))
    setValue(math.ceil(BasicUnarmedOverall + BasicUnarmedBonus))
    end
    function onInit()
    setVisible(false);
    source = window.getDatabaseNode().getChild("UnarmedProfLeve l")
    source1 = window.getDatabaseNode().getChild("UnarmedMasteryL evel")
    source2 = window.getDatabaseNode().getChild("UnarmedGrandMas teryLevel")
    source3 = window.getDatabaseNode().getChild("stats.dexterity ")
    source4 = window.getDatabaseNode().getChild("UnarmedProfBonu ****")
    source5 = window.getDatabaseNode().getChild("UnarmedMasteryB onusHit")
    source6 = window.getDatabaseNode().getChild("UnarmedGrandMas teryBonusHit")
    source.onUpdate = update
    source1.onUpdate = update
    source2.onUpdate = update
    source3.onUpdate = update
    source4.onUpdate = update
    source5.onUpdate = update
    source6.onUpdate = update
    update()
    end
    </script>
    </modbox>
    "Tis better to die on your feet, then live on your knees."

  4. #4

    Join Date
    Feb 2009
    Location
    Jacksonville, Florida
    Posts
    153
    Oh GODDAMMIT :P

    I removed all the [] completely and didn't replace it with () and it works fine. Anyone know if I can use any form of brackets? I want it to state [sm -1] or whatever when it rolls! :PPP
    "Tis better to die on your feet, then live on your knees."

  5. #5
    I'm not sure if you need to escape out the [] characters. Might try it thought. Those characters are considered special characters in programming. Try putting them back in with a \[ and \] and see if it helps. Can't know for sure, but it is a thought.

  6. #6
    I would store that information separately and not use it in the tags.

    Most programming languages are fairly picky about what characters can be used in variable names, and all the controls are converted into variables for LUA support.

    * A variable name has to start either with a letter (character) or an underscore.
    * Only characters, numbers an underscores are allowed in variable names.
    * Reserved words are not allowed for using as name for a variable.

    Cheers,
    JPG

  7. #7

    Join Date
    Feb 2009
    Location
    Jacksonville, Florida
    Posts
    153
    Yea it's all fixed and good to go now :P but I'd have liked to keep the brackets. No worries.
    "Tis better to die on your feet, then live on your knees."

  8. #8
    Doswelk's Avatar
    Join Date
    Jul 2005
    Location
    Surrey, UK
    Posts
    2,681
    Quote Originally Posted by Visvalor
    Yea it's all fixed and good to go now :P but I'd have liked to keep the brackets. No worries.
    When I am creating libraries and I want to force a preceding space into the title of an entry I use #160;

    Could you not use #40; and #41; ?

    Not tried it myself but might work.
    My players just defeated an army, had a dogfight with aliens, machine-gunned the zombies, stormed the tower, became Legendary and died heroically

    Yours are still on combat round 6

    Get Savage
    Ultimate License Holder.
    First GM to post a game for the original FG Con!

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
  •  
FG Spreadshirt Swag

Log in

Log in