DICE PACKS BUNDLE
  1. #1
    tlavalle's Avatar
    Join Date
    Oct 2010
    Location
    St Cloud, MN USA
    Posts
    238

    xml comments error out

    with the comment i have by aero systems. it keeps erroring out on that line. does FG read comments different or am i adding them wrong?

    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    
    <root version="0.1">
    	<properties>
    		<name>Achtung! Cthulhu</name>
    		<version>1</version>
    		
    		<author>TonyL</author>
    		<description>Skills for Achtung Cthulhu.</description>
    
        <exclusiongroup>Achtung</exclusiongroup>
    
        <ruleset>
    			<name>CallOfCthulhu</name>
    			<minrelease>1</minrelease>
    		</ruleset>
    	</properties>
    
    	<base>
    		<script name="erainit">
          local name = "Achtung";
          local skills = {
            ["Accounting"] = { base=10}, 
            ["Aero Systems"] = { base=1}, <!-- Added 06/26/2017 -->
            ["Anthropology"] = { base=1},
            ["Archaeology"] = { base=1},
            ["Art"] = { sublabeling=true,  base=5},
            ["Astronomy"] = { base=1},
            ["Bargain"] = { base=5},
            ["Biology"] = { base=1},
            ["Chemistry"] = { base=1},
            ["Climb"] = { base=40},
    Ultimate License holder.

    Cluster bombing from B-52s is very, very accurate. The bombs always hit the ground.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Because that section of the code is within a <script> tag, FG is running it as LUA. <!-- Added 06/26/2017 --> is not valid LUA. But, as it is also set within XML there are further requirements to use comments.

    See the "Using scripts" section here: https://www.fantasygrounds.com/modguide/scripting.xcp In particular this line: The "--[[ ]]" comment syntax must be used instead of the "--" syntax

    So use --[[Added 06/26/2017]]

    But, you really should put scripts like this in their own .lua file. It's easier to debug, easier to comment code, etc..
    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!

  3. #3
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,243
    Blog Entries
    9
    Hmm, I always put comments on their own line, but I don't know if that is needed. Your formatting is correct. Try removing or moving the comment to see if you still get an error on that line number.
    EDIT: Doh! Ninja'd by the AI with the correct answer!

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

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
  •  
STAR TREK 2d20

Log in

Log in