Satis Posted April 9, 2017 Share Posted April 9, 2017 So I'm doing an mod install for an LIF:YO mod and was working in the config editor. I made an repeat section for taxi points to be added. It needs he following inputs: Message Timeout Cords Radius So I created this regex string to be used: ^([\s]*BasilMod::horsetaxi_register\([\s]*"(?<Message>[\w\W\s]+)"[\s]*,[\s]*(?<Timeout>[0-9]+)[\s]*,[\s]*"(?<Cords>.+)"[\s]*,[\s]*(?<Radius>[0-9]+)[\s]*\);[\s]*)$ I selected these check boxes: Items separated by new line Allow new items Allow delete items I then added this as an template: BasilMod::horsetaxi_register("\n\nGetting you a fresh horse from the stables...", 3, "931.822 76.92 1011", 1); Done for the repeat section setup. I then created the 4 value section like this: Textbox : Message (With deny character ") Slider : Timeout (Range 1-60 with 1 step) Textbox : Cords (With this regex: ^([\-]?[\d]{1,4}[\.\d]{0,4}[\s][\-]?[\d]{1,4}[\.\d]{0,4}[\s][\-]?[\d]{1,4}[\.\d]{0,4})$) Slider : Radius (Range 1-60 with 1 step) I then saved it all, reloaded so I could see the repeat section I made. I then pressed the new taxi point button and it added an new section with all the stuff as it should, no problem there. I then added a second one, but instead of adding a new section after the first one, it wrote the string at the end of the Message Textbox instead of making an new section. What am I missing here? I have made one for another mod with only 3 values and that one is working as intended, so am a bit lost her to why it's doing this. Link to comment Share on other sites More sharing options...
Satis Posted April 14, 2017 Author Share Posted April 14, 2017 Fixed it my self after some fiddling with it. The regex for the repeat section is now like this: BasilMod::horsetaxi_register\([\s]*"(?<Message>[^"]*)"[\s]*,[\s]*(?<Timeout>[0-9]+)[\s]*,[\s]*"(?<Cords>.+)"[\s]*,[\s]*(?<Radius>[0-9]+)[\s]*\); The Message groupe: (?<Message>[\w\W\s]+) was the problem. using that regex for it took everything else after it as well, so if you had 2 lines, it would grab that line as well. Fixed it by changing it to: (?<Message>[^"]*) instead. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now