7 Days to Die

7 Days to Die

View Stats:
BloodyRain2k Sep 15, 2020 @ 12:21pm
Modlet XPath issue with 'ends-with' function.
So I wanted to make a modlet that makes weapon parts scrappable and in that process I found out that 'ends-with' is not working (anymore?) as a function.

Instead it throws the following error
2020-09-15T21:06:48 25.755 ERR XML loader: Patching 'items.xml' from mod 'Item Improvements' failed: 2020-09-15T21:06:48 25.756 EXC Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function. XPathException: Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function. at MS.Internal.Xml.XPath.CompiledXpathExpr.get_QueryTree () [0x00012] in <1d98d70bb7d8453b80c25aa561fdecd1>:0
for this simple line
<set xpath="/items/item[ends-with(@name, 'gun')]/property[@name='Material']/@value">Mmetal</set>
Last edited by BloodyRain2k; Sep 15, 2020 @ 12:22pm
< >
Showing 1-3 of 3 comments
RyanFaeScotland Oct 5, 2022 @ 5:28am 
Found this post from 2018 that suggests 'ends-with' is not currently supported: https://community.7daystodie.com/topic/7653-xpath-modding-explanation-thread/#comment-170892
BloodyRain2k Oct 5, 2022 @ 5:59pm 
Wow, I didn't even know anymore that I wrote this. I wonder if it's still broken.

Now I wish I'd have posted a file too instead of having to figure out where to throw this line.

Edit: and now I remember, the recent changes that moved the mod folder for whatever ♥♥♥♥♥♥♥♥ reason, no being able to save data in the user profile my arse, made me no longer understand where the hell to put mods, so I stopped playing :D
Last edited by BloodyRain2k; Oct 5, 2022 @ 7:38pm
龙雕心文 May 28, 2024 @ 12:09am 
use "contains" instead of "ends-with".
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Sep 15, 2020 @ 12:21pm
Posts: 3