Cosmere RPG Beta Launch
  1. #1

    Database type mismatch on path

    I added a number field to the record_char_inventoy.xml file

    <numberfield name="purchasepercentage">
    <anchored to="typefilter" position="right" offset="155,1" height="20" width="40" />
    <default>100</default>

    </numberfield>

    This works for most, but for SOME characters I get "ERROR: windowcontrol: Database type mismatch on path (purchaspercentage) in control (purchasepercentage) in class (charsheet_inventory_contents)"

    I set the value on the character sheet as a node, but I notice that for some it does it like this:
    <purchasepercentage type="number">100</purchasepercentage>

    but for the ones that don't work it does this:


    <purchasepercentage>
    <holder name="alloowishus" owner="true" />
    <purchasepercentage type="number">100</purchasepercentage>
    </purchasepercentage>


    Any ideas? thanks.
    Last edited by alloowishus; Yesterday at 05:18.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    34,086
    This means that the data stored for the PC with the error is the wrong datatype - maybe at some point purchaspercentage was a string or some other different database node type. Have a look in the database at the <charsheet> entries that raise errors to see what type the purchaspercentage node is - or, just delete that node so that it can be recreated with the correct type. If this occurs even for new characters then you'll probably have some code somewhere else that's creating the purchaspercentage with a different type.
    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
    Also make sure that all of your references are for purchasepercentage and not purchaspercentage (lack of e at the end of purchase).

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    34,086
    Quote Originally Posted by DCrumb View Post
    Also make sure that all of your references are for purchasepercentage and not purchaspercentage (lack of e at the end of purchase).
    Good spot!
    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!

  5. #5
    Quote Originally Posted by Trenloe View Post
    This means that the data stored for the PC with the error is the wrong datatype - maybe at some point purchaspercentage was a string or some other different database node type. Have a look in the database at the <charsheet> entries that raise errors to see what type the purchaspercentage node is - or, just delete that node so that it can be recreated with the correct type. If this occurs even for new characters then you'll probably have some code somewhere else that's creating the purchaspercentage with a different type.
    The weird thing is that I deleted the node from the db.xml file and took out the part of the code that created the node, but when I reloaded it recreated the node.

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    34,086
    Quote Originally Posted by alloowishus View Post
    The weird thing is that I deleted the node from the db.xml file and took out the part of the code that created the node, but when I reloaded it recreated the node.
    If the numberfield you show the XML for in post #1 is created (displayed or initiated via the fastinit setting) then the database node will also be created as this is a "field" control and so it's tied to the database. If you're not displaying that control and the node is being created then there'll be some code somewhere that's creating it.
    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 2 users browsing this thread. (0 members and 2 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
  •  
Starfinder Playlist

Log in

Log in