Thread: Crap need help.
-
July 20th, 2010, 22:50 #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."
-
July 20th, 2010, 23:00 #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."
-
July 20th, 2010, 23:19 #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."
-
July 20th, 2010, 23:25 #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."
-
July 21st, 2010, 01:25 #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.
-
July 21st, 2010, 02:39 #6
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,564
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
-
July 21st, 2010, 06:07 #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."
-
July 28th, 2010, 18:28 #8Originally Posted by Visvalor
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
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