As noted earlier, I'm relatively new to lua, but then again, I will find out quickly. The last time they helped me, it helped me a lot, and I was able to write a better script. Now I have come to another question, which, I think, will make my life easier. I have no idea what I am doing with functions, but I hope there is a way to do what I want to do here. Below you will see an example of the code I need to do to break some unnecessary elements. Yes, I understand that this is ineffective, so if someone even better knows how to make it much more efficient, Iβm all ears. What I would like to do is create a function with it so that I can break any variable with a simple call (e.g. stripdown (winds)). I appreciate any help that is offered, and any lessons. Thank you
winds = string.gsub(winds,"%b<>","") winds = string.gsub(winds,"%c"," ") winds = string.gsub(winds," "," ") winds = string.gsub(winds," "," ") winds = string.gsub(winds,"^%s*(.-)%s*$", "%1)") winds = string.gsub(winds," ","") winds = string.gsub(winds,"/ ", "(")
Josh
source share