Thread: Database type mismatch on path
-
Today, 05:01 #1
- Join Date
- Feb 2021
- Posts
- 415
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; Today at 05:18.
-
Today, 05:15 #2
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!
-
Today, 07:35 #3
Also make sure that all of your references are for purchasepercentage and not purchaspercentage (lack of e at the end of purchase).
-
Today, 15:34 #4Private 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!
-
Today, 19:47 #5
- Join Date
- Feb 2021
- Posts
- 415
Thread Information
Users Browsing this Thread
There are currently 3 users browsing this thread. (1 members and 2 guests)
Bookmarks