Originally Posted by Sharlikran
I am going to try this Lua console from source forge, no idea how to use it yet though. ^_^
Does anyone know a good Lua console that is easy to run like Python and Ruby?
Lua Code:
function Harvest.IsValidWoodworkingName(name) local nameMatch = false for lang, langs in pairs(Harvest.langs) do for k, v in pairs(Harvest.woodworking[langs]) do if v == name then nameMatch = true end end end return nameMatch end
That all works fine, so I have to build off of it and try to apply it to what I want with the map names.
|
Just as a note, you can escape early from that loop by using return true as soon as you have a match and return false outside the loop.