Results 1 to 3 of 3

Thread: Modlet Error (Changing Marksmen Rifle Sound)

  1. #1
    Leader Laz Man's Avatar
    Join Date
    Jan 2014
    Posts
    5,605
    Rep Power
    1

    Modlet Error (Changing Marksmen Rifle Sound)

    Probably a newb mistake but I am getting the following "Invalid Token" error when trying to change the sound of the marksmen rifle to the AK47. (error occurs after loading a game, not at application startup)



    See my modlet code below (items.xml). Any suggestions? Thanks!

    Code:
    <configs>
     
    <set xpath="/items/item[contains(@name, 'gunMR10')]/property[contains(@class, 'Action0')]/property[contains(@name, 'Sound_start']/@value">ak47_fire</set>
    <set xpath="/items/item[contains(@name, 'gunMR10')]/property[contains(@class, 'Action0')]/property[contains(@name, 'Sound_repeat']/@value">ak47_fire</set>
    	
    </configs>
    Last edited by Laz Man; 3 Weeks Ago at 08:12 AM.

  2. #2
    Colony Founder sphereii's Avatar
    Join Date
    Dec 2015
    Posts
    3,946
    Rep Power
    1
    Quote Originally Posted by Laz Man View Post
    Probably a newb mistake but I am getting the following "Invalid Token" error when trying to change the sound of the marksmen rifle to the AK47. (error occurs after loading a game, not at application startup)



    See my modlet code below (items.xml). Any suggestions? Thanks!

    Code:
    <configs>
     
    <set xpath="/items/item[contains(@name, 'gunMR10')]/property[contains(@class, 'Action0')]/property[contains(@name, 'Sound_start']/@value">ak47_fire</set>
    <set xpath="/items/item[contains(@name, 'gunMR10')]/property[contains(@class, 'Action0')]/property[contains(@name, 'Sound_repeat']/@value">ak47_fire</set>
    	
    </configs>
    Take a look at your last contains() on each line. You open the round brace for the contain, but you do not close it before the ].

  3. #3
    Leader Laz Man's Avatar
    Join Date
    Jan 2014
    Posts
    5,605
    Rep Power
    1
    Quote Originally Posted by sphereii View Post
    Take a look at your last contains() on each line. You open the round brace for the contain, but you do not close it before the ].
    Ty! Will try that change later today.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •